Troubles using Pro*C
Date: 24 Aug 2001 20:10:20 GMT
Message-ID: <9m6cbc$1f6$1_at_news.cec.uchile.cl>
[Quoted] Hi everybody
I´ve the next trouble in Pro*C.
A function X is declared as:
char *X(char *);
but the problem is that, when I read the return value from X:
sprintf(buffer,X(arg)) (with arg any string)
I only get the first 16 character in buffer!!!! (X must return 26 or more characters)
[Quoted] My question is: Is there any compilation flag related with this? Or is this simply a bug in Pro*C?
In fact, if I replace my declaration of X, to a procedure
X(arg,buffer)
it works!!!! and returns the correct number of characters in buffer.
Even more, if I print the return value of X (declared as a function) from inside X, I mean:
char *X(char *arg)
{
....
printf("%s",RETURN_VALUE);
return(RETURN_VALUE);
}
I got the correct number of characters in RETURN_VALUE, but the returned value is wrong!!!
Thanks for your help
I´m using Oracle 8.1.6 on an HP-UX 11.00 (64 bits)
-- Atte. Álvaro Palma Aste Grupo de Ing Biomédica - U. de Chile apalma_at_cipres.cec.uchile.cl.no.spamReceived on Fri Aug 24 2001 - 22:10:20 CEST
