View Single Post
  #3  
Old 03-30-2007, 11:55 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by Skyld View Post
Hm, in my opinion, it is better to always prefix variables. That way, there is no confusion as to which scope you are working in.

I try to write my scripts for people who have to work with them as well as for myself.
For myself, I only do this no-prefixing thing for temp variables, like how local variables in Java usually go without a prefix. So there is no confusion for myself. But also, all the temp variables are declared at the beginning so you know them already.

Edit:
I would like it if un-prefixed variables defaulted to temp. rather than a global if no previous temp. or this. variables were found.
__________________
Reply With Quote