what's the longest local and/or external name that i can use
in a C program? What about C++ names ?
Is n't system independent ?
tia
ps: i could have post this question in the C++ forum too, but
i prefer this board![]()
This is a discussion on variable names within the C Programming forums, part of the General Programming Boards category; what's the longest local and/or external name that i can use in a C program? What about C++ names ? ...
what's the longest local and/or external name that i can use
in a C program? What about C++ names ?
Is n't system independent ?
tia
ps: i could have post this question in the C++ forum too, but
i prefer this board![]()
Short answer: Compiler specific.
Long answer: According to K&R Second Edition, a variable name may be of any length; however, only the first 31 characters are significant. Compilers are free to extend this beyond 31, and may make any number of characters significant.
Jason Deckard
>only the first 31 characters are significant
For local variables, variables and functions with external scope are only guaranteed to be signifigant to the first 6 characters.
-Prelude
My best code is written with the delete key.
Though I would recommend not to use very long names. They make code not very readable.