Naming Conventions

Discuss anything else that does not suite other forums.

Moderator: Rathinagiri

User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Naming Conventions

Post by esgici »

melliott42 wrote:Can anyone suggest a compelling reason to use single or double quotes for string values?

If not what do most Clipper\HMG programmers use?
I guess no any compulsion.

Only when need string into string ;)

Do you know, we have another (at least) one string delimiter : [ ] ;)

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Naming Conventions

Post by Rathinagiri »

esgici wrote:
melliott42 wrote:Can anyone suggest a compelling reason to use single or double quotes for string values?

If not what do most Clipper\HMG programmers use?
I guess no any compulsion.

Only when need string into string ;)

Do you know, we have another (at least) one string delimiter : [ ] ;)

Regards

--

Esgici
This one is new to me.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Naming Conventions

Post by Rathinagiri »

Thanks a lot for a nice topic. :)

Previously I used my own naming conventions ie., no naming convention at all. :)

Now I had started using,

cChar
nNumeric
lLogic
dDate
aArray
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Naming Conventions

Post by esgici »

Hi Rathi

Good decision :)

Since you are in a starting point, please try three letter prefix ( type + scope ). May be fatiguing at beginning, but after a short time surely you will be addicted because of its benefits.

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
melliott42
Posts: 119
Joined: Wed Feb 18, 2009 2:14 pm

Re: Naming Conventions

Post by melliott42 »

after a short time surely you will be addicted because of its benefits.
Oh yes! :-)

For large projects there is no other way to maintain your code too!

I am at a re-starting place and found it a good time to re-evaluate what conventions I use and why. Esgicia and others here always give such insightful advice. A few words from them can save us all many hours of coding. :D
User avatar
cdsaenz
Posts: 58
Joined: Sun Jul 11, 2010 4:02 am

Re: Naming Conventions

Post by cdsaenz »

As rathinagiri said, I prefer the Hungarian notation.
a = Array
b = Block
c = Character
d = Date
l = Logic
n = Numeric
o = Object

And h = hash?
Charly
Argentina, Hobbyist developer, Clipper/Delphi/PHP/Progress
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Naming Conventions

Post by esgici »

cdsaenz wrote:As rathinagiri said, I prefer the Hungarian notation.
a = Array
b = Block
c = Character
d = Date
l = Logic
n = Numeric
o = Object

And h = hash?
Agreeable (including "h") :)

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
cdsaenz
Posts: 58
Joined: Sun Jul 11, 2010 4:02 am

Re: Naming Conventions

Post by cdsaenz »

I really have to play around with hashes. They're so nice.
Charly
Argentina, Hobbyist developer, Clipper/Delphi/PHP/Progress
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Naming Conventions

Post by esgici »

Could you give a SSW ;(

Saludos

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
swapan
Posts: 242
Joined: Mon Mar 16, 2009 4:23 am
Location: Kolkata, India
Contact:

Re: Naming Conventions

Post by swapan »

esgici wrote:Could you give a SSW ;(

Saludos

--

Esgici
I started with prefixing "m" to a variable e.g.:
amount = mamount
name = mname

later adopted the hungarian style
amount = nAmount
name = cName

During Vb6 and. .NET, used:

prefixing with the control names.
name =txtName (textbox control)

Great to know Rathi's style (no conventions)! Never came this "idea", as I learnt to add "m" to memory variables from seniors during learning days of programming! :D
Thanks & Regards,
Swapan Das

http://www.swapandas.com/
Post Reply