POV-Ray : Newsgroups : povray.newusers : Problem with variables : Re: Problem with variables Server Time
4 Sep 2024 16:13:54 EDT (-0400)
  Re: Problem with variables  
From: Kaveh
Date: 27 Oct 2002 09:55:23
Message: <1fkpvur.194ifw61yxczkeN%kaveh@delete_this.focalimage.com>
Johannes Dahlstrom <sad### [at] tkukoulufi> wrote:

> Kaveh wrote:
> 
> > Thanks Johannes. I haven't come across this construction, and can't find
> > it in the manual. Can you give me a hint as to where I can find more
> > information on this?
> > 
> 
> You mean the ? : ternary operator? Basically, it works like a simple 
> if/else construct:
> 
>  #if(<expression>) <do_this> #else <do_that> #end
> 
> is the same as:
> 
>  (<expression>) ? <do_this> : <do_that>
> 
> That is, if <expression> returns true, it executes the <do_this> part,
> otherwise the <do_that> part.
> 
> In the POV manual: 
> 6.1.3.3 Float Operators
> http://www.povray.org/documentation/view/137/

Got it. Except you had == which according to the manual should be =. I
did a search for == but couldn't find it. I would have guessed == too!

-- 
Kaveh


Post a reply to this message

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