Re: Pro*C
Date: Fri, 18 Dec 1992 14:50:40 GMT
Message-ID: <1992Dec18.145040.17095_at_cs.joensuu.fi>
richard_at_crowded-house.den.mmc.com (Richard Armstrong) writes:
...
>Why doesn't the Pro*C precompiler do #define substitutions? For instance,
>one cannot do the following:
>#define MAXLEN 80
>EXEC SQL BEGIN DECLARE SECTION;
>varchar string[MAXLEN + 1];
>EXEC SQL END DECLARE SECTION;
>Pro*C doesn't like MAXLEN, so I run the C pre-processor to do the substitution,
>but then Pro*C doesn't like the [80 + 1]. So I had to write my own pre-
>processor to do the math.
>I have a solution, but it requires running cpp, and my own custom pre-processor,
>and then finally running Pro*C. Does this seem lame to anyone besides me?
>Is this fixed in v7? I am stuck with v6 for now... Does anyone have a fix
>to this better than what I came up with?
Use m4. It is standard, it is powerful and it does the trick. You have to redefine some of m4's keywords but that's no big deal. 'man m4' for more information.
>This is my only real show-stopper complaint with Pro*C.
>--
>My company never said any of this... I didn't either.
>Richard Armstrong, Software Engineer, Martin Marietta
>Email->>>> richard_at_crowded-house.den.mmc.com <<<<-Email
-- Olli Mikkonen Internet: omikko_at_cs.joensuu.fiReceived on Fri Dec 18 1992 - 15:50:40 CET