POV-Ray : Newsgroups : povray.general : simple syntax question : Re: simple syntax question Server Time
3 Aug 2024 18:22:24 EDT (-0400)
  Re: simple syntax question  
From: Christopher James Huff
Date: 12 Dec 2003 19:53:04
Message: <cjameshuff-1F15EF.19484412122003@netplex.aussie.org>
In article <3fd9b52a@news.povray.org>,
 "D. Stimits" <nos### [at] comcastnet> wrote:

> This works. Prior to this I made the mistake of not using declare after 
> the variable was declared, a bit of a C-ism. But since it is really a 
> macro expansion, it isn't a lot like C, the use of declare each and 
> every modification of Node_Center does the job :)

It sounds like you have a misunderstanding here. The #declare statement 
is not a macro declaration. It declares an actual variable. After 
"#declare A = 2+2;", "A" is a variable containing the value 4, not a 
macro expanding to the string "2+2".
For modifying variables, the #declare or #local is necessary. This is 
just a syntax issue, and has nothing to do with macros. (In MegaPOV, 
there is a #set keyword specifically for modifying existing variables 
without the possibility of accidentally creating a new one.)

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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