How do you write your code?
View Single Post
06-10-2009, 05:42 PM
Join Date: Sep 2007
One thing I've began to do that most do not is placing the constant to the left and the variable to the right. For example
This makes it harder to accidentally forget the second = and assign the variable. Since I program in VB as a profession (one = check in an IF statement) and do PHP and C on the side, it is very easy to accidentally put one = instead of two. With this approach, the program will generate a parse error because you are trying to assign a constant.
It looks awkward at first but becomes very useful once you get used to it.
View Public Profile
Send a private message to Village Idiot
Find More Posts by Village Idiot