POV-Ray : Newsgroups : povray.newusers : if inside a macro syntax (if...else) : Re: if inside a macro syntax (if...else) Server Time
5 Sep 2024 02:01:58 EDT (-0400)
  Re: if inside a macro syntax (if...else)  
From: kurtz le pirate
Date: 30 Dec 2004 17:36:19
Message: <kurtzlepirate-B13F12.23361930122004@news.povray.org>
In article <41d436b0@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

>>kurtz le pirate <kur### [at] yahoofr> wrote:
>>>  - macro in pov is not the same as macro in c. there is no "code 
>>> substitution".
>>
>>  There is and there isn't. It's a bit complicated. See my other post
>>on the subject.

  yes you're right but in c, macro is for the pre-processor and c has 
real functions. in sdl pov, there is no "real" function.

  for exemple max() in c is a macro defined by
  #define max(a,b) (a>=b?a:b)

  when in c source there is a line like that :
  foo=max(big,small)

  before compiling, the pre-processor transforme the line to :
  foo=(big>=small?big:small)

  not the same mechanic than sdl pov as you say in your previous post.

  klp


Post a reply to this message

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