//====================================================================== // bigid1.cpp // Test program to demonstrate ISO standard recommendations for // minimum identifier lengths. // // References // ISO/IEC 14882:1998(E), Annex B. // // 1.00, 1998-10-15, David R Tribble. // First cut. // // Written by David R. Tribble, 1998. // This source code is in the public domain. //---------------------------------------------------------------------- // Preprocessor macro magic #define K(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) \ a##b##c##d##e##f##g##h##i##j##k##l##m##n##o##p #define A1024 \ K(A234567890123456789012345678901234567890123456789012345678901234,\ A234567890123456789012345678901234567890123456789012345678901234,\ A234567890123456789012345678901234567890123456789012345678901234,\ A234567890123456789012345678901234567890123456789012345678901234,\ A234567890123456789012345678901234567890123456789012345678901234,\ A234567890123456789012345678901234567890123456789012345678901234,\ A234567890123456789012345678901234567890123456789012345678901234,\ A234567890123456789012345678901234567890123456789012345678901234,\ A234567890123456789012345678901234567890123456789012345678901234,\ A234567890123456789012345678901234567890123456789012345678901234,\ A234567890123456789012345678901234567890123456789012345678901234,\ A234567890123456789012345678901234567890123456789012345678901234,\ A234567890123456789012345678901234567890123456789012345678901234,\ A234567890123456789012345678901234567890123456789012345678901234,\ A234567890123456789012345678901234567890123456789012345678901234,\ A234567890123456789012345678901234567890123456789012345678901234) // A 1024-character name //---------------------------------------------------------------------- // Class A2345678901234567890123456789012... // This class has a name that is 1024 characters long. //---------------------------------------------------------------------- class A1024 { public: static int s_mem; int m_mem; }; //---------------------------------------------------------------------- // big_named_objectA // This is an instance of the class declared above. // // If this object (which has external linkage) is successfully // instantiated, then the compiler appears to properly support very // long identifiers. //---------------------------------------------------------------------- /*static*/ int A1024::s_mem = 123; static class A1024 big_named_objectA; //---------------------------------------------------------------------- // ::main() // Dummy entry function. //---------------------------------------------------------------------- int main() { return (0); } // End bigid1.cpp