POV-Ray : Newsgroups : povray.documentation.inbuilt : [3.8] macro optional example Server Time: 18 Jan 2019 01:52:40 GMT
  [3.8] macro optional example (Message 1 to 3 of 3)  
From: ingo
Subject: [3.8] macro optional example
Date: 7 Dec 2018 18:20:41
Message: <XnsA9B1C4C8DAA2Fseed7@news.povray.org>
http://wiki.povray.org/content/Reference:User_Defined_Macros#The_macro_Dir
ective#Optional_Parameters

The example for the optional option for macros has a bit too many ";" 't 
won't run like that.

cleaned up:

#macro Foo(P1, optional P2)
#ifndef(local.P2) #local P2 = 0; #end // provide default for P2
...
#end

#declare X=1;
#declare Y=2;
Foo(X,Y)
#undef Y
Foo(X,Y)
Foo(X,)

ingo


Post a reply to this message

From: Jim Holsenback
Subject: Re: [3.8] macro optional example
Date: 8 Dec 2018 11:19:35
Message: <5c0ba8c7$1@news.povray.org>
On 12/7/18 1:20 PM, ingo wrote:
> The example for the optional option for macros has a bit too many ";" 't
> won't run like that.

done: http://wiki.povray.org/content?title=Special:RecentChanges&hidebots=0


Post a reply to this message

From: ingo
Subject: Re: [3.8] macro optional example
Date: 8 Dec 2018 16:50:42
Message: <XnsA9B2B587BEBC9seed7@news.povray.org>
in news:5c0ba8c7$1@news.povray.org Jim Holsenback wrote:

> http://wiki.povray.org/content?title=Special:RecentChanges&hidebots=0

Thanks,

ingo


Post a reply to this message

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