POV-Ray : Newsgroups : povray.unofficial.patches : POV+for() : Re: POV+for() Server Time
3 Sep 2024 04:21:04 EDT (-0400)
  Re: POV+for()  
From: Ron Parker
Date: 7 May 1999 16:20:25
Message: <37333cf9.0@news.povray.org>
On Fri, 07 May 1999 13:46:56 -0400, Phil Clute <pcl### [at] tiacnet> wrote:
>I have to admit my experience with C programming is extremely
>limited. I guess I am confused as to what a "macro" is then.
>I assumed that constants were macros. What makes #define a 
>macro and #declare not a macro? They seem to serve the same
>purpose.

C's #define lets you do
  #define FOO(x,y,z) (x*32+y*z)

which you can then use like a function:

  printf( "%d", FOO(1,2,3) );

whereas #declare creates an actual instance of the specified
object and puts it in a "variable."  #declare is a lot like the
BASIC "Let" statement.

#macro is pretty much the same as #define, but with a little
different syntax.


Post a reply to this message

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