Skip site navigation (1) Skip section navigation (2)

ECPG: How to use #define and string host variable

From: reply2nelson(at)yahoo(dot)com (Nelson)
To: pgsql-interfaces(at)postgresql(dot)org
Subject: ECPG: How to use #define and string host variable
Date: 2002-01-02 18:22:59
Message-ID: 87d854b8.0201021022.681de39c@posting.google.com (view raw or flat)
Thread:
Lists: pgsql-interfaces
I want to declare a character string's
length as a #define and below gives me:

ERROR: parse error, expecting `CVARIABLE' or `ICONST' or `']'' or `'('
' at or near "MAX"


#define MAX 10

EXEC SQL BEGIN DECLARE SECTION;
   char t[MAX];
EXEC SQL END DECLARE SECTION;


How do I make the precompiler see the define?

Thanks.

Responses

pgsql-interfaces by date

Next:From: Sandro DentellaDate: 2002-01-03 10:09:39
Subject: ANNOUNCE: tksql rel 0.5.21
Previous:From: Bjrn LundinDate: 2002-01-02 10:33:24
Subject: Ada interface (tihick)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group