POV-Ray : Newsgroups : povray.general : Why does POV always evaluate both expressions with a '&'? : Re: Why does POV always evaluate both expressions with a '&'? Server Time
20 Nov 2024 10:14:13 EST (-0500)
  Re: Why does POV always evaluate both expressions with a '&'?  
From: Thorsten Froehlich
Date: 27 Sep 2001 11:50:15
Message: <3bb34ab7@news.povray.org>
In article <gk7### [at] michariser> , Micha Riser <mri### [at] gmxnet>  
wrote:

> #while((i<n)&(a[i]=0))
>         #declare i=i+1
> #end
>
> Maybe it is just me as I am used to this from other programming languages I
> use. Is anybody else finding this annoying?

The above code is illegal in C and C++, without question the most commonly
used programming language around today.  Many other well-designed languages
do not promise you that they do the minimum either (with a few very specific
exceptions, but that is not the point).  The example you provide is simply
extremely bad programming style and it is neither a bug nor a limitation on
part of POV-Ray that the above does not work.

    Thorsten


Post a reply to this message

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