Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Coding conventions
Message
From
02/01/2004 02:42:01
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
01/01/2004 14:55:03
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00863303
Message ID:
00863382
Views:
11
>My question is about naming variables. For numeric variables, the second letter of the variable name (the type) is usually an "n". Now, if the variable will contain only integer data, you might also use the letter "i" for the variable type. Does anybody do this, or recommend this?
>
>I have been using "n" for several years, whether the variable contains integers, or real numbers.

I'm not doing it and wouldn't do. If some day I decide to change an int to a double it'd mean to change var names too (convention wise). An int is a field type and in the same manner c for chars and m for memo would be ugly.
Honestly I never liked the convention. I use the convention for 2 reasons :
-To match the UT community in my codes posted
-To prevent name clash with PEM namings.
Otherwise actually I find it nonsense to name say 'FirstName' as 'cFirstName' or 'ShipDate' as 'dShipDate'. For the latter dShipped would seem to be a shortcut but I don't like it, Shipped might be a date or boolean and I prefer ShipDate, Shipped instead vs dShipped,lShipped. IOW I try to include type clue directly within the name rather than prefix.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform