POV-Ray : Newsgroups : povray.general : Question 'bout indentation (no flamewar) : Re: Question 'bout indentation (no flamewar) Server Time
12 Aug 2024 03:26:31 EDT (-0400)
  Re: Question 'bout indentation (no flamewar)  
From: Nieminen Mika
Date: 30 Mar 1999 11:45:29
Message: <3700ffa9.0@news.povray.org>
Tom Melly <tom### [at] aolcom> wrote:
: #if (A > 0)
:     union {
:         sphere { ... }
:         sphere { ... }
:     }
: #else
:     sphere { ... }
: #endif

  This is not good coding since you are repeating code unnecesarily.
  You should declare the repeated sphere code as an identifier and use that
identifier instead.

: union {
:     sphere { ... }
:      #if (A > 0)
:          sphere { ... }
:      #endif
: }

  This is not good coding either, since you get a warning when A<=0.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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