Re: Pro*C Variables and Define Tokens
Date: 23 Sep 92 16:16:06 GMT
Message-ID: <2724_at_uswnvg.uswnvg.com>
As far as I know, you cannot directly use #define constants in Oracle variables.
One alternative is to write an AWK script (or something like that) which reads in your #define constants into an associative array, and then changes all occurances of the variable within the program to the specified value. This would have to also take care of the "+/-" sign, but that would be fairly easy to do.
I also agree with you that Oracle should take the time to have the pre-compiler handle the constant. One possibility is to just take whatever value you place inside the []'s and use that string as the size portion of the string. That way the resolution of the #define is left up to the c compiler.
And, while they are at it, it would be nice if the pre-compiler would produce "lintable" code.
Mark McGregor -- mmcgreg_at_uswnvg.com
These be my opinions. Current market value: 2 cents.
Received on Wed Sep 23 1992 - 18:16:06 CEST