I use prefixes on lots of things
My query names all begin with qry. Arrays begin with arr. Form fields
begin with the type they are. 'txt' for text, 'rad' for radio, 'btn' for
button, 'htxt' for hidden text, etc.
The only things I don't prefex are Session and Application variables because
it's rather obvious what those are.
This might be just an old habbit from my VB days, and it might be a bit
excessive sometimes, but this really helps me see what I'm trying to do, at
a glance. Also having a small set of repetative prefixes allows me to
quickly scan my code for them to find my variables, instead of trying to
look for each individual variable name. It's just easier for me in the long
run.
Todd Ashworth
----- Original Message -----
From: "Michael Dinowitz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 04, 2000 12:46 PM
Subject: (syntax) variable naming conventions
| I've started to use some variable prefixes in some of my code and was
| wondering what others were using. I'd like to see a few examples before I
| post an article on it. My usage at the moment is limited to complex data
| types:
| aArray
| sStructure
| qQuery
| oObject
| I'm sure a case can be made for something like xWDDX, bBoolean, iInteger,
| nNumber, dDate, tTextString, lList but I'd rather not go that far yet.
| Who's using something like this? Is it helping you in any way? Is it
| hindering you in any way?
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.