Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Breaking lines in Pro*C programs - Linux env RH AS 3.0 Oracle 9.2.4.0

Re: Breaking lines in Pro*C programs - Linux env RH AS 3.0 Oracle 9.2.4.0

From: Laurenz Albe <invite_at_spam.to.invalid>
Date: 22 Sep 2006 09:43:10 GMT
Message-ID: <1158918187.199454@proxy.dienste.wien.at>


raphael.duenas_at_agfa.com wrote:
> I use this type of syntax in more than 150 programs, and I can compile
> these with Pro*C compilers on HPUX , AIX, DGUX, Oracle 8i and 9 ... so
> I think that something changed with my Red Hat/Oracle 9 , a parameter
> of Pro*C perhap's ?

Please, don't top-post.

I think that you are mixing up two different things:

  1. Line continuation in SQL statements
  2. Breaking up C string constants into multiple lines.

The first one should work at least in 10g, see http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14407/pc_02prc.htm#sthref139

Example:
EXEC SQL INSERT INTO t VALUES('example of a \ split string');

The second seems to make Pro*C choke.

Example:
printf("This won't\
work\n");

Can you see the difference?

Have you tried:
printf("This might "
"work\n");

Yours,
Laurenz Albe Received on Fri Sep 22 2006 - 04:43:10 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US