POV-Ray : Newsgroups : povray.off-topic : Smart little programming tricks, where to find ? : Smart little programming tricks, where to find ? Server Time
10 Oct 2024 17:21:14 EDT (-0400)
  Smart little programming tricks, where to find ?  
From: Fa3ien
Date: 18 Mar 2008 03:55:12
Message: <47df8370$1@news.povray.org>
Hi,
I've read (in "joel on software") that, to avoid confusion between == and =,
when you sometimes use languages that use = as assignments AND comparisons,
you can do some comparisons like this :

  0 == myvalue

instead of

  myvalue == 0

the former causes an error if you put = instead of ==, which avoids potential
headaches later.

While it could seem very ordinary to hardcore programmers here, to me it's
very smart, and I would like to know if there's some place where I could
learn other little tricks like this...

any links ?

Fabien.


Post a reply to this message

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