View Single Post
# 12 03-06-2003 , 09:16 AM
Hugh's Avatar
Registered User
Join Date: Nov 2002
Location: Bristol, UK
Posts: 25
Personally, I've been taught to always declare variables - whether I need to or not - I find it makes my code a lot easier to debug...

Also, you could use Hungarian notation (I think that's what this is) for naming variables - then you always know what a variable is meant to be used for:

string $sObjectName;
int $iNumObjects;
bool $bFinished;
float $fValue;

and so on....

Then if you find yourself doing:

$iObject = "myObject";

You'll know you're doing something wrong, as you can see at a quick glance that $iObject is meant to hold an int....


Hugh Macdonald

UnFramed Productions
Goodnight Opus - TD Lead

VFXTalk.com - Online Compositing Community - Admin