ecpg help
ecpg help
От:
"sid@questions.com" <sbhatt@installs.com>
Дата:
Hi, I am trying to use preprocessor directives inside the declare statements but its giving me compile time errors. What i am do is something like this EXEC SQL BEGIN DECLARE SECTION; char myvar[NUM]; EXEC SQL END DECLARE SECTION; #define NUM 20 is present in one of the include files. Please help. Vikas.
Re: ecpg help
От:
Michael Meskes <meskes@postgresql.org>
Дата:
On Thu, Jun 27, 2002 at 12:26:02PM -0400, sid@questions.com wrote: > I am trying to use preprocessor directives inside the declare statements but > its giving me compile time errors. > What i am do is something like this > > EXEC SQL BEGIN DECLARE SECTION; > char myvar[NUM]; > EXEC SQL END DECLARE SECTION; > > #define NUM 20 is present in one of the include files. Please use "EXEC SQL DEFINE NUM 20" to define NUM for ECPG. ECPG does not parse CPP directives. Michael -- Michael Meskes Michael@Fam-Meskes.De Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!
ecpg help
От:
Lee Kindness <lkindness@csl.co.uk>
Дата:
Try this: EXEC SQL DEFINE NUM 20 EXEC SQL BEGIN DECLARE SECTION; char myvar[NUM]; EXEC SQL END DECLARE SECTION; Regards, Lee Kindness. sid@questions.com writes: > I am trying to use preprocessor directives inside the declare statements but > its giving me compile time errors. > What i am do is something like this > > EXEC SQL BEGIN DECLARE SECTION; > char myvar[NUM]; > EXEC SQL END DECLARE SECTION; > > #define NUM 20 is present in one of the include files.