Hello Andreas, > -----Original Message----- > From: Andreas Bohn [mailto:[EMAIL PROTECTED]]
> The Precompiler appears to not like the common c++ style > comments between > the EXEC SQL BEGIN / END DECLARE SECTION; statements, even if one > compile with the -cplus option set. > > A //c++ comment at the end of a line like > You can use the c like comments. Perhaps we add support for c++ like comments in the declare section in future versions. > It appears to me, that the -cplus option only instructs the > cpc to create > a file with the CPP-file-extension instead of the C-file-extension. Is > this correct ? No. The Precompiler also generates some other function headers for local DECLARE SECTIONS. > The Precompiler Manual Page 2-2 says: > An SQL statement can be interrupted by comments in C format > (designated by > /* and */). Within an SQL statement, comments can also be > placed at the > end of a line. They must be preceded by the characters "--". > > Well, .. ok .., but is an DECLARE SECTION an SQL statement ? No. > Another thing that comes to my mind is string concatenation. > Normally one uses the \ (backslash) to extend a string literal in the > source to the next line, i.e. > > EXEC SQL 1 PREPARE dbGetObjOAR_Simple FROM > "SELECT DISTINCT rtERG (OID) \ > FROM DUMMY_OAR, rtSVEC \ > WHERE DUMMY_OAR.AID IN (rtSVEC.AID)"; > > and MUCH longer statements are likely being written. If don't use double quotes around your SQL statements, you can put in line breaks without a backslash at the end of the line to format your source. But you should not put a line break between EXEC and SQL this will not work. > However, if you are indenting your source, you will get a bunch of > blanks in front of your next lines, causing blanks to blow up > your total > sql-statement length (wich is limited of course). No double quote no space will added. Regards Burkhard -- [EMAIL PROTECTED] SAP DB, SAP Labs Berlin http://www.sapdb.org/ _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general
