POV-Ray : Newsgroups : povray.general : parsing of conditionals Server Time
2 Nov 2024 17:20:25 EDT (-0400)
  parsing of conditionals (Message 1 to 2 of 2)  
From: Margus Ramst
Subject: parsing of conditionals
Date: 9 Mar 1999 18:32:18
Message: <36e5af82.0@news.povray.org>
Hi, a quick question to those who know.
When I have multiple conditions in one conditional, say #if, all separated
with & (and), will the rest of the conditions be parsed when one is found
false? Or would it be more efficient to have nested conditionals, each with
a single condition?

Margus


Post a reply to this message

From: Nieminen Mika
Subject: Re: parsing of conditionals
Date: 10 Mar 1999 05:50:16
Message: <36e64e68.0@news.povray.org>
Margus Ramst <mar### [at] peakeduee> wrote:
: When I have multiple conditions in one conditional, say #if, all separated
: with & (and), will the rest of the conditions be parsed when one is found
: false?

  Yes. You can test it for example this way:

#declare a=-1;
#if(a>=0 & sqrt(a)<1) #debug "Ok" #end

  It pruces the error message "error: sqrt of negative number -1.000000".

-- 
main(i){char*_="BdsyFBThhHFBThhHFRz]NFTITQF|DJIFHQhhF";while(i=
*_++)for(;i>1;printf("%s",i-70?i&1?"[]":" ":(i=0,"\n")),i/=2);} /*- Warp -*/


Post a reply to this message

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