Re: Drawing in Pro*c???

From: Alligator Descartes <descarte_at_istellar.demon.co.uk>
Date: Thu, 22 Sep 1994 11:35:58 +0000
Message-ID: <782648153snz_at_istellar.demon.co.uk>


In article <35ohjr$1q1_at_cougar.vut.edu.au>

           leng_at_cougar.vut.edu.au "Leng Kaing" writes:

> Alvin W. Law (alaw_at_oracle.com) wrote:
> : In article <35as5k$ibt_at_cougar.vut.edu.au> leng_at_cougar.vut.edu.au (Leng Kaing)
> writes:
>
> : If you can code it in C, sure you can do so in Pro*C. The
> : pre-compiler function of Pro*C only deals with database accesses.
> : Once you fetch your data from the database, how you use the data is
> : bound only by your imagination and coding skills.
>
> Ok, on a related topic: can I use structures in Pro*C? I've started
> writing a program that uses structures, but it gives me compilation
> error. Here's the declaration:
>
> struct pnt {int x,y;};
> struct lne {struct pnt p1, p2;};
>
> void dplay(struct pnt pArray[],int index, char statusBar[]);
>
> And in the main, some more declarations:
> struct pnt p;
> struct pnt pArray[Nmax];
>
> Compilation error:
> "protest.c", line 179: syntax error at or near word "struct"
>
> *** Error code 1
> make: fatal error: Command failed for target 'protest'
>
> The error occurs at the instant the structure pnt is declared. Could
> you possibly tell me what's wrong. And what restrictions Pro*C has
> regarding structures. Must structures map to a table in the
> database???

Are you sure this isn't to do with your C compiler not grokking ANSI parameter definitions? Use GCC. Similarly, isn't there a switch that allows you to generate either ANSI C, or K&R C from the Precompiler?

Check on that one to. Those definitions above look ANSI to me....

I've been using structures merrily in Pro*C for years now with no problems!  

Hope this helps.

> Leng.
 

-- 
Alligator Descartes 		     |  "Murder, Polis!"
descarte_at_istellar.demon.co.uk        |   		- Bud Neill	
-------------------------------------+----------------------------------------
XDBA - An X-based database management tool for ORACLE. 
	ftp.informatik.uni-oldenburg.de/pub/oracle/xdba/xdba-0.0.2.tar.gz

 	[ Will be here ASAP! ]
XERD - An X-based Entity Relationship Diagram Modeller. Don't ask me about it!
	[ In Alpha ]
Received on Thu Sep 22 1994 - 13:35:58 CEST

Original text of this message