home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / database / oracle / 2574 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.5 KB  |  49 lines

  1. Newsgroups: comp.databases.oracle
  2. Path: sparky!uunet!mcsun!news.funet.fi!cs.joensuu.fi!omikko
  3. From: omikko@cs.joensuu.fi (Olli Mikkonen)
  4. Subject: Re: Pro*C
  5. Message-ID: <1992Dec18.145040.17095@cs.joensuu.fi>
  6. Organization: University of Joensuu
  7. References: <1992Dec17.195431.13161@den.mmc.com>
  8. Date: Fri, 18 Dec 1992 14:50:40 GMT
  9. Lines: 38
  10.  
  11. richard@crowded-house.den.mmc.com (Richard Armstrong) writes:
  12.  
  13. ...
  14. >Why doesn't the Pro*C precompiler do #define substitutions? For instance,
  15. >one cannot do the following:
  16.  
  17. >#define MAXLEN 80
  18.  
  19. >EXEC SQL BEGIN DECLARE SECTION;
  20. >varchar string[MAXLEN + 1];
  21. >EXEC SQL END DECLARE SECTION;
  22.  
  23. >Pro*C doesn't like MAXLEN, so I run the C pre-processor to do the substitution,
  24. >but then Pro*C doesn't like the [80 + 1]. So I had to write my own pre-
  25. >processor to do the math.
  26.  
  27. >I have a solution, but it requires running cpp, and my own custom pre-processor,
  28. >and then finally running Pro*C.  Does this seem lame to anyone besides me?
  29.  
  30. >Is this fixed in v7?  I am stuck with v6 for now... Does anyone have a fix
  31. >to this better than what I came up with?
  32.  
  33. Use m4.  It is standard, it is powerful and it does the trick.
  34. You have to redefine some of m4's keywords but that's no big deal.
  35. 'man m4' for more information.
  36.  
  37. >This is my only real show-stopper complaint with Pro*C.
  38.  
  39. >Any input is appreciated.
  40.  
  41.  
  42. >-- 
  43. >My company never said any of this... I didn't either.
  44. >Richard Armstrong, Software Engineer, Martin Marietta
  45. >Email->>>> richard@crowded-house.den.mmc.com <<<<-Email 
  46.  
  47. -- 
  48. Olli Mikkonen                Internet: omikko@cs.joensuu.fi
  49.