E
eryer
Hi,
what rules do you follow when naming variables in c programming?any
suggestion, link, etc...?
what rules do you follow when naming variables in c programming?any
suggestion, link, etc...?
what rules do you follow when naming variables in c programming?any
suggestion, link, etc...?
That's pretty open-ended.
My preference is to use naming conventions as much as possible. In
particular, if there's only one loop index variable in sight, it's
probably "i". If there are string pointers, they're usually "s" and
"t". Conventions like that go a long way towards making it easier
to read programs; big long variable names can be harder to parse.
That said, anything that isn't going to be used as often as a loop
variable typically gets a descriptive name.
I pretty much exclusively use lower_case_with_underscore; I dislike
capital letters in identifiers.
receiverAutomaticGainControlSetting =
AUTOMATIC_GAIN_CONTROL_ENABLED;
I've seen identifiers that weren't unique in the first 18 characters
(the compiler only checked the first eighteen characters).
eryer said:Hi,
what rules do you follow when naming variables in c programming?any
suggestion, link, etc...?
eryer said:what rules do you follow when naming variables in c programming?any
suggestion, link, etc...?
That's a clear indication that you have no standing as a computer
scientist, and are utterly ignorant of C programming. If you had the
slightest idea what you were talking about, you would use precisely the
same naming conventions that I do.
Hi,
what rules do you follow when naming variables in c programming?any
suggestion, link, etc...?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.