Do any of you use naming conventions for your variables? My tutor at college says don't bother but I was wondering if it was a good idea? A book I've got says use a letter at the start of a variable name as follows:
n for int
l for long
f for float
d for double
c for character
sz for string
and then for every new word start it with a capital letter.. But what would you use for other variable types? b for bool? Also, I've been told that when declaring constant veriables it's best to do it all in capitals.. Is this all standard stuff with programmers?
Question
mark52230
Do any of you use naming conventions for your variables? My tutor at college says don't bother but I was wondering if it was a good idea? A book I've got says use a letter at the start of a variable name as follows:
n for int
l for long
f for float
d for double
c for character
sz for string
and then for every new word start it with a capital letter.. But what would you use for other variable types? b for bool? Also, I've been told that when declaring constant veriables it's best to do it all in capitals.. Is this all standard stuff with programmers?
Link to comment
Share on other sites
10 answers to this question
Recommended Posts