|
![](/i/fill.gif) |
Alain <ele### [at] netscape net> wrote:
> When I had some programming courses, the teachers always told us that it was
> VERY BAD practice to test for a negated comparaison.
>
> To write "if(x != 0)" or "if(x <> 0)", depending on the language used, was a
> sure way of failing. Instead, it was MANDATORY to use "if(x)". (x!>y) had to be
> replaces by (x<=y) whenever possible to. And (x !>= y) was an heresy!
>
Interesting!
The only programming courses I've ever taken were back in the 'pre-history' days
of computing--writing Fortran IV on punched cards! (Which *really* dates me,
eh?) I could very well have been taught the same do's and don'ts--but I've
sadly forgotten.
But back to POV: If I had written the POV 'escape' code like this...
#if(vlength(norm) = 0)
// don't make an object
#else
object{my_object translate <...the traced-on location...>}
#end
....it somehow doesn't 'look' right to me--sort of like telling POV NOT to make
any objects 'unless...'
An interesting little psychological difference. :-)
KW
Post a reply to this message
|
![](/i/fill.gif) |