Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Pro*C/C++, __FILE__ and __LINE__
Hi Alex,
try Precompiler-Option: LINES=YES.
In my error-code I use:
printf("\tin Zeile %d of %.*s.\n\n", oraca.oraslnr,
oraca.orasfnm.orasfnml, oraca.orasfnm.orasfnmc);
I hope this helps.
Arndt
Alex Vinokur wrote:
> Hi,
>
> Is there in Pro*C/C++ something like the __FILE__ and __LINE__ macros?
> Using these macros in *.pc files doesn't cause to desirable result.
>
> Thanks in advance,
> Alex
>
> //#########################################################
> //------------------- Pro*C/C++ code : BEGIN --------------
> #include <stdio.h>
> int main()
> {
> printf ("%s, #%d\n", __FILE__, __LINE__); // file main.pc,
> line#4
> return 0;
> }
> //------------------- Pro*C/C++ code : END ----------------
>
> //#########################################################
> //------------------- Running Results : BEGIN -------------
>
> main.c, #135
>
> //------------------- RunninG Results : END ---------------
>
> //#########################################################
> //------------------- Database, Compiler, 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 Fri Oct 08 1999 - 06:07:57 CDT
![]() |
![]() |