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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-interfaces by date

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