POV-Ray : Newsgroups : povray.general : The Language of POV-Ray : Re: The Language of POV-Ray Server Time
10 Aug 2024 17:28:15 EDT (-0400)
  Re: The Language of POV-Ray  
From: Nieminen Juha
Date: 10 Mar 2000 07:58:40
Message: <38c8f180@news.povray.org>
Axel Baune <aba### [at] neuroinformatikuni-ulmde> wrote:
: The variant

:> > #declare A = A + B;
:> > #declare A = A - B;

: is far more readable than the other.

  In this case yes. But what about a longer identifier, like something
already suggested:

#declare ColorArray[ColorIndex][ColorSubIndex].red =
  ColorArray[ColorIndex][ColorSubIndex].red + 1;

or:

#declare ColorArray[ColorIndex][ColorSubIndex].red += 1;

  Note also that if one of the indices is a complex mathematical operation,
it would have to be calculated twice, instead of just once.
  Also if you have to modify the line, you would have to do it in two places
in the line instead of just one place.
  And you don't have to use the feature if you don't want to. The existance
of a feature doesn't make it mandatory to use it. I don't make a quartic
to get a torus although this possibility exists and is an inherent feature
in povray.

: Besides this it would comlicate the
: parser of PoV if the other variant should be maintained.

  Was this only a guess or do you really know that it will be conclusively
more complicated?

-- 
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.