|
|
in news:3dd13a9e$1@news.povray.org Johan Feyaerts wrote:
> I 'd want to pass an array of values to a macro?
#macro NumberItems(Array)
#local Return=dimension_size(Array,1);
(Return)
#end
#declare Arr=array[5]{1,2,3,4,5}
#declare Num=NumberItems(Arr);
#debug str(Num,0,0)
Also look in the docs for "dimension" to figure out the amount of
dimensions of an array.
Ingo
Post a reply to this message
|
|
|
|
In article <3dd13a9e$1@news.povray.org> , "Johan Feyaerts" <johan_feyaerts
[at] no_spam.skynet.be> wrote:
> Need some help on syntax.
> I 'd want to pass an array of values to a macro? Is this possible in pov
> 3.5?
Declare the array, then pass it. How to declare arrays and how to pass
declared values to a amcro is explained in the manual. It has always been
possible sincemacros were introduced in POV-Ray 3.1.
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
|