POV-Ray : Newsgroups : povray.newusers : Array + macro syntax : Re: Array + macro syntax Server Time
30 Jul 2024 08:18:57 EDT (-0400)
  Re: Array + macro syntax  
From: Tor Olav Kristensen
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

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