|
 |
Cousin Ricky <ric### [at] yahoo com> wrote:
> Saw it coming! This feature (not a bug!) has zapped some veterans,
> including BE, Ive,
It's an easy thing to forget about.
There has been some discussion about "wrapping" the feature, using a flag/switch
for enabling/protecting against the feature, or issuing a warning "argument
valued altered".
> and the author of colors.inc::CH2RGB().
Story time! :)
> The particulars are explained here:
>
>
https://wiki.povray.org/content/Reference:User_Defined_Macros#Returning_Values_Via_Parameters
Yes, I had that tab open in my browser just in case.
You beat me to it.
I would like that whole section to moved the the top of the page,
"This mistake is more likely to be made with float identifiers versus float
expressions. Consider these examples.
#declare Value=5.0;
MyMacro(Value) //MyMacro can change the value of Value but...
MyMacro(+Value) //This version and the rest are not lone
MyMacro(Value+0.0) // identifiers. They are float expressions
MyMacro(Value*1.0) // which cannot be changed.
Although all four invocations of MyMacro are passed the value 5.0, only the
first may modify the value of the identifier."
and for the example preceding to be a little clearer. The box {} example is a
bit too strange to lead in with.
The numerical examples are good, but a full-fledged .pov file with extended
commentary and output would be best - either as a downloadable file or just
cut-n-paste SDL right there on the wiki page.
- BE
Post a reply to this message
|
 |