home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.oracle
- Path: sparky!uunet!mcsun!news.funet.fi!cs.joensuu.fi!omikko
- From: omikko@cs.joensuu.fi (Olli Mikkonen)
- Subject: Re: Pro*C
- Message-ID: <1992Dec18.145040.17095@cs.joensuu.fi>
- Organization: University of Joensuu
- References: <1992Dec17.195431.13161@den.mmc.com>
- Date: Fri, 18 Dec 1992 14:50:40 GMT
- Lines: 38
-
- richard@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.
-
- >Any input is appreciated.
-
-
- >--
- >My company never said any of this... I didn't either.
- >Richard Armstrong, Software Engineer, Martin Marietta
- >Email->>>> richard@crowded-house.den.mmc.com <<<<-Email
-
- --
- Olli Mikkonen Internet: omikko@cs.joensuu.fi
-