Liste des Groupes | Revenir à cl c |
David Brown <david.brown@hesbynett.no> writes:
>On 03/12/2024 02:23, Tim Rentsch wrote:>
>scott@slp53.sl.home (Scott Lurndal) writes:>>For the most part I don't use abbreviations in the usual sense of>
the word, although I do sometimes use short non-words in a small
local context (here "short" means usually one or two letters, and
never more than four or five).
A general guideline followed by most people is to have the length of
identifiers (or their semantic content) increase with larger scope of
the identifier. "i" is fine as a counter of a small loop, but you would
not want to use it for a file-scope static.
>
Which abbreviations are appropriate is often context-dependent. As long
as the context is clear, they can be very helpful - in a genetics
program, you would definitely want to use "DNA_string" in preference to
"deoxyribonucleic_acid_string" as an identifier!
I agree with both of these. In addition, when processing
character strings, I'll often use 'cp' as a character pointer.
Les messages affichés proviennent d'usenet.