PCC-S-02201 when template variable in DECLARE SECTION

From: Alex Vinokur <alexander.vinokur_at_telrad.co.il>
Date: Mon, 11 Oct 1999 10:10:32 GMT
Message-ID: <7tsd2j$idq$1_at_nnrp1.deja.com>



Hi,

Is there any possibily to use template-variables in DECLARE SECTION?

Using template-variable in DECLARE SECTION in example below

        causes PCC-S-02201 error message.

        Thanks in advance,
        Alex

//#########################################################

//------------------- Pro*C/C++ code : BEGIN --------------

// File oracle1.pc
template <class T1>
void foo (

                const RWCString&                        tableName_i,
                const RWCString&                        keyAttrName_i,
                const T1&                               keyAttrValue_i
                )

{

        [--- omitted ---]

#define KEY_VALUE_HOST keyValue_host;

EXEC SQL BEGIN DECLARE SECTION;
T1 KEY_VALUE_HOST = keyAttrValue_i; // Line#642 EXEC SQL END DECLARE SECTION;         [--- omitted ---]

} // void foo ()

//------------------- Pro*C/C++ code : END ----------------

//#########################################################

//------------------- Compilation Results : BEGIN ---------

Pro*C/C++: Release 8.0.5.0.0 - Production on Mon Oct 11 11:58:14 1999

(c) Copyright 1998 Oracle Corporation. All rights reserved.

System default option values taken from: /home/u01/app/oracle/product/8.0.5/precomp/admin/pcscfg.cfg

Syntax error at line 642, column 1, file oracle1.pc: Error at line 642, column 1 in file oracle1.pc T1 KEY_VALUE_HOST = keyAttrValue_i;
1
PCC-S-02201, Encountered the symbol "T1" when expecting one of the following:

   auto, char, const, double, enum, extern, float, int, long,    OCIBFileLocator OCIBlobLocator, OCIClobLocator, OCIDate,    OCINumber, OCIRaw, OCIString, register, short, signed,    sql_context, sql_cursor, static, struct, typedef, union,    unsigned, varchar, void, volatile, a typedef name,    exec oracle, exec, exec sql, exec sql begin, exec sql end,    exec sql type, exec sql var, exec sql include,

Syntax error at line 0, column 0, file oracle1.pc: Error at line 0, column 0 in file oracle1.pc PCC-S-02201, Encountered the symbol "<eof>" when expecting one of the following:

   ; : an identifier, end-exec, random_terminal

Error at line 0, column 0 in file oracle1.pc PCC-F-02102, Fatal error while doing C preprocessing make: *** [doit] Error 1


//------------------- Compilation Results : END -----------

//#########################################################

//------------------- System ------------------------------
=== Oracle 8.0.5

=== Pro*C/C++ : Release 8.0.5.0.0
=== SunOS 5.6
//---------------------------------------------------------

//#########################################################



Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Oct 11 1999 - 12:10:32 CEST

Original text of this message