Re: reserved identifiers in Pro*C

From: William Kaufman <wkaufman_at_us.oracle.com>
Date: 3 Aug 93 20:06:06 GMT
Message-ID: <1993Aug3.200606.2099_at_oracle.us.oracle.com>


In article <1993Aug3.153629.108859_at_embl-heidelberg.de> hazledine_at_embl-heidelberg.de writes:
] In article <1993Aug3.104718.85503_at_ucl.ac.uk>, Alan Deacon writes:
]
[...had a name clash w/Pro*C,...]
]
] I presume the list of global symbols in the ORACLE libraries and object files
] is version dependent (and perhaps even o/s dependent as well), so I guess
] the only safe thing is to use whatever utilities are provided by your
] operating system to extract all the names from the libraries and object files
] you have on your own machine (and to recreate that list whenever you upgrade the
] ORACLE software).

    Good advice. It is a bit of a pain, admittedly.

] Under VMS (which we use), LIBRARY/LIST/NAMES would do the job for an object
] library and ANALYZE/OBJECT/GSD would do it for an object file. You'd then have
] to do some simple post-processing to extract just the names from the report
] produced by each command.

    On Unix, you can use

        nm {library/object filename} | egrep ' [dDtTcC] '

(The egrep removes the object file names, which you probably don't care about; and the symbols referenced from other modules, which are marked with "U".)

] Why Oracle Corp. couldn't adopt some simple naming convention to make it easy
] for users to avoid name clashes in their own software is beyond me. Sigh...

    Actually, Oracle does have naming conventions:

  1. All external names are less than 8 characters. If your compiler supports longer names, use them and you should never have problems.
  2. All external names will be lower-case. If your compiler supports mixed-case symbols, use them where applicable.
  3. As for the rest of the names, it's usually a character for a subcomponent, and the rest for a specific module, like "iapxtb" for "IAP (runforms) eXtensions TaBle". Since these names are constructed one or two characters at a time, they're usually unreadable and meaningless: so, if you choose meaningful names, you're usually safe.

    (There are several more naming rules, but they're really only for internal requirements; they won't help *you* get good names; and they're convoluted enough that users should have to deal with them.)

  • Bill K.
Bill Kaufman,          | "Maybetheyhadaridiculousstatementtomakeaboutsomethingt
Corporate Lackey       |  heyhadntexperiencedPossiblySamhadadifferentopiniontha
wkaufman_at_us.oracle.com | tnobodyeverconsideredimportant." -- the Meat Puppets Received on Tue Aug 03 1993 - 22:06:06 CEST

Original text of this message