473,396 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Identifier Length/limit in C++....??

I just want to know what is the length of Identifiers in C++. In C its length is 32 but I don't know what is the length in C++...
Jul 16 '14 #1
3 4487
weaknessforcats
9,208 Expert Mod 8TB
There is no mandatory maximum limit but the C++ Standard says a length of 1024 should be supported.

I saw one implementation where the identifier length was quite long but required to be unique in the first 32 positions.
Jul 16 '14 #2
donbock
2,426 Expert 2GB
The C Standard sets the minimum number of significant characters that must be supported by all conforming implementations. Some implementations exceed these minimums, but taking advantage of that benefit can make your software hard to port to other implementations.

C89 Standard:
6 characters for external identifiers;
31 characters for internal identifiers.

C99 Standard:
31 characters for external identifiers;
63 characters for internal identifiers.

C11 Standard:
(same as C99)
31 characters for external identifiers;
63 characters for internal identifiers.

The limit on external identifiers is relevant for conforming linkers.
Jul 16 '14 #3
weaknessforcats
9,208 Expert Mod 8TB
Also keep in mind that C++ uses name mangling (decoration)so the actual identifier used by the compiler is not the one you coded. The algorithm is compiler specific so different compilers will use different mangled names for your identifier.

A rose is a @&r!!os@)e. :)
Jul 16 '14 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: FabienV | last post by:
Hi ! Here is my problem : I think an url variable could be limited, maybe someone know the maximum length I can use ? (I try to send an html code with the get method, maybe some symbols could...
0
by: Binesh Bannerjee | last post by:
Hi... I've asked before about making an element in a schema be able to use xhtml... I've attached my schema definition below... What I'm curious about, is whether there's a means to add a length...
3
by: JOSHUA JACKS | last post by:
I receive data from a web form in csv (comma and quote) form which I import into Access. The data include some long narratives (three fields of two to three paragraphs). Access seems to cut off...
2
by: Tom Dacon | last post by:
I'm raising an event in a component, using ISynchronizeInvoke.Invoke, and my event args object contains a string as one of its members. If the string is longer than 63 bytes, the Invoke call pulls...
1
by: jim | last post by:
what is the maximum identifier length in C#? is it documented somewhere?
1
by: IceColdFire | last post by:
I have a VC++.net Win32 console application, however when I compile , I get this error error C2146: syntax error : missing ';' before identifier 'Length' Explain... Location pointed is ...
3
by: David T. Ashley | last post by:
I have this ugly habit of prefixing all function and variable names with some identifying information about the owning module and perhaps also the subcategory of function, i.e. ...
4
by: Alec MacLean | last post by:
Is anyone aware of a size limit imposed on the subject text when using the System.Net.Mail library? I'm getting problems of message not being recieved if the subject exceeds 15 chars. Thx
2
by: =?Utf-8?B?Q2hyaXMgRGF2b2xp?= | last post by:
I thought there was a limit of characters passed on the URL in asp.net of 1100 characters. I sent 1426 characters and it worked. Is there a limit of number of characters on the URL that you can...
0
by: hcetiner | last post by:
Hi, I downloaded CSASPNETFormViewUpload example (you can google.download.run.within a minute.database is ready to use) everything seems good. uploading an image to a sqlserver record...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.