Re: why are Oracle Pro*C examples K&R not ANSI?

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Fri, 26 Nov 1999 09:35:54 -0500
Message-ID: <2l6t3s8e02rm2kbsi35l4nj6r8nc7idnus_at_4ax.com>


A copy of this was sent to cjundieseastwd_at_powerup.com.au (Clint Eastwood) (if that email address didn't require changing) On Fri, 26 Nov 1999 06:35:39 GMT, you wrote:

>HIYa
>
>I was reading some O manuals recently and came across this example,
>which I thought wasn't kocher anymore... no?
>

it is still kosher -- ansi allows for it (Ansi is a superset of k&r). it is 'more portable' (there are still compilers out there that don't allow for prototypes)..

>void
>sql_error(msg)
>char *msg;
>{
> char err_msg[128];
> int buf_len, msg_len;
>
> EXEC SQL WHENEVER SQLERROR CONTINUE;
>
> printf("\n%s\n", msg);
> buf_len = sizeof (err_msg);
> sqlglm(err_msg, &buf_len, &msg_len);
> printf("%.*s\n", msg_len, err_msg);
>
> EXEC SQL ROLLBACK RELEASE;
> exit(1);
>}
>
>
>
>
>See Ya
>(when the bandwidth gets better ;-)
>Chris Eastwood Please remove undies for reply
>Photographer, Stunt Programmer
>Motorcyclist and dingbat

-- 
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
 
Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation
Received on Fri Nov 26 1999 - 15:35:54 CET

Original text of this message