Re: Pro*C

From: Richard H. E. Eiger <rheiger_at_renext.eiger.olivetti.ch>
Date: Sun, 20 Dec 1992 10:52:29 GMT
Message-ID: <1992Dec20.105229.955_at_osnbe.Olivetti.ch>


In article <1992Dec17.220804.12585_at_tigger.jvnc.net> fogelinc_at_nmr1.Cyanamid.COM (Carl Fogelin) writes:
> In article 13161_at_den.mmc.com, richard_at_crowded-house.den.mmc.com (Richard
 Armstrong) writes:
> >
> >I have plenty of good things to say about Oracle Pro*C. However, let me
> >focus on one area where I find Pro*C completely brain-dead.
> >
 [stuff deleted]
> >
> >Why doesn't the Pro*C precompiler do #define substitutions?
>
> Because the scope of the Pro*C preprocessor would probably get out of hand.
> Sure, it would be nice if the Pro*C preprocessor would at least recognize
> #defines which are at the top of the current module, but the c preprocessor
> can be much more complicated. What about #defines found in an #include file?
> What about #defines which use conditional assignments (i.e., #ifdef)? These
> are just a couple of complications, but if you think about it, I'm sure you
> can come up with more.
>
> Yes, I agree that I wish Pro*C did the #define substitutions, but I
 understand
> why they didn't do it. What I don't understand is why "struct"ures are not
> valid for host variables, but VARCHARs (which are structures) are... 8-(
>
> -------------------------------------
> Carl Fogelin (fogelinc_at_cyanamid.com)
>

The problems described here are a nuisance, I agree. But there are things I find much much worse in PRO*C. For instance, you can specify ireclen and oreclen. But, PRO*C still has an upper limit. When that is reached your output will be erratic without warning!

The other real stupidity is that PRO*C is not clever enough to put "#line nnn file.pc" statements into the output. It would be so much less of a pain to find errors in the .pc source when the C-compiler complains. And also runtime output from the assert macro would finally be useful.

The solution to this is to preprocess the .pc file before feeding it to pcc.

	Just my 2 cents.
	Richard
--
                         
    ___           _____2
   /   )  /  /   /        Richard H. E. Eiger
  /_ _/  /__/   /__       Ing. Informatik HTL
 /\     /  /   /          Unregistered NeXT fan
/  \   /  /   /_____      rheiger_at_renext.eiger.olivetti.ch (NeXT mail welcome)
Received on Sun Dec 20 1992 - 11:52:29 CET

Original text of this message