Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site genix.UUCP Path: utzoo!linus!philabs!seismo!harpo!floyd!cmcl2!lanl-a!unm-cvax!unmvax!genix!ldl From: ldl@genix.UUCP Newsgroups: net.lang.c Subject: Re: Identifier significance CHALLENGE Message-ID: <471@genix.UUCP> Date: Tue, 13-Dec-83 02:49:17 EST Article-I.D.: genix.471 Posted: Tue Dec 13 02:49:17 1983 Date-Received: Thu, 15-Dec-83 01:19:56 EST References: <60@sdcsvax.UUCP> Organization: Genix, Ltd., Albuquerque, NM Lines: 52 In light of the fact that we (programmers) cannot depend on having identifiers of more than 'n' characters, I have taken to writing code somewhat differently. I 'beat up' on cpp's features. I'm not too sure if this plan will really work, but it does on our V7 environment. In a header: #define foobarthere snm00 /* routine description */ #define foobarhere snm01 /* routine description */ In code: foobarthere(...) { ... foobarhere(...); ... } foobarhere(...) { } Notice that in the source code, the 'long ids' are used. The macro processor 'remaps' the names into something that the compiler can handle, but that the user doesn't have to think about it. A further use of this (needed in my case) is that there are several 'support' routines (our stuff is divided into libraries) that are called by the 'main' routines in the library. Using this technique, there is no need to be concerned about having routines in one library uniquely named from all other routines. The 'real' name is controlled by the 'remapped' name that is handled by cpp. At first, I was rather concerned about the 'limits' of C external tags, etc, but using the above technique, no problems have been encountered to date (and over 80000 lines of lex, yacc, and C). Use cpp! P.S. I have hit the limit of 'too much defining' in one area. I took care of this by building a simple interface that uses m4 (yuck! for C). I still work in 'pure' C, and let a couple of scripts and make work out the details. -- Spoken: Larry Landis USnail: 5201 Sooner Trail NW Albuquerque, NM 87120 MaBell: (505)-898-9666 UUCP: {ucbvax,gatech,parsec}!unmvax!genix!ldl