POV-Ray : Newsgroups : povray.newusers : Array + macro syntax Server Time
2 Nov 2024 07:23:46 EDT (-0400)
  Array + macro syntax (Message 1 to 3 of 3)  
From: David Harmon
Subject: Array + macro syntax
Date: 15 Aug 2004 13:30:10
Message: <41219b98.232143015@news.povray.org>
I can't see where I go wrong.  This is supposed to be an array
of xyz vectors.  The error message is:

File Context (5 lines):
    xsp_point
Parse Error: Insufficent [sic] number of initializers

POV source is:

#macro xsp_point(xspc, zspc)
    <xspc, 0, zspc>
#end    
#declare Track_path = array[4] {
    xsp_point( 147.5762, 144.0371),   // Error points here.
    xsp_point( 152.7021, 96.0146),   
    xsp_point( 171.1753, 60.6523),   
    xsp_point( 219.02, 59.0303)
}


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Array + macro syntax
Date: 15 Aug 2004 15:14:54
Message: <411fb62e$1@news.povray.org>
David Harmon wrote:

> I can't see where I go wrong.  This is supposed to be an array
> of xyz vectors.  The error message is:
> 
> File Context (5 lines):
>     xsp_point
> Parse Error: Insufficent [sic] number of initializers
> 
> POV source is:
> 
> #macro xsp_point(xspc, zspc)
>     <xspc, 0, zspc>
> #end    
> #declare Track_path = array[4] {
>     xsp_point( 147.5762, 144.0371),   // Error points here.
>     xsp_point( 152.7021, 96.0146),
>     xsp_point( 171.1753, 60.6523),
>     xsp_point( 219.02, 59.0303)
> }

This works:


#macro xsp_point(xspc, zspc)

   <xspc, 0, zspc>

#end // macro xsp_point


#declare Track_path =
   array[4] {
     (xsp_point( 147.5762, 144.0371)),
     (xsp_point( 152.7021, 96.0146)),
     (xsp_point( 171.1753, 60.6523)),
     (xsp_point( 219.02, 59.0303))
   }

-- 
Tor Olav
http://subcube.net
http://subcube.com


Post a reply to this message

From: David Harmon
Subject: Re: Array + macro syntax
Date: 15 Aug 2004 17:51:57
Message: <4123daba.248305078@news.povray.org>
On Sun, 15 Aug 2004 21:19:09 +0200 in povray.newusers,
Tor Olav Kristensen <tor### [at] TOBEREMOVEDhotmailcom> wrote:

>#declare Track_path =
>   array[4] {
>     (xsp_point( 147.5762, 144.0371)),

Thanks, Tor!


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.