Greetings, I am having a rather strange problem when using an enumerated type declared in a unit. If that type is used in a second unit, and also in a third that uses both the first and second, the type cannot be used as a parameter to a function. This probably isn't a very good description, so please just look at the example I have included at the end of this post, it is the smallest program I could produce to generate the problem. The output from gpc is:
gpc p.pas p.pas: In function `program_P': p.pas:23: incompatible type for argument 1 of `U_proc'
I am running on Redhat Linux 5.0, and my gpc version is version 19980830, based on gcc-2.8.1. Does anyone know what might be causing this, and if there is a workaround or fix? Thanks in advance, Sam. --- begin example (p.pas) --- unit e; interface type t_e = ( e_a, e_b ); implementation begin end. unit u; interface uses e; procedure u_proc(e: t_e); implementation procedure u_proc; begin end; begin end. program p; uses e, u; begin u_proc(e_a); { error is generated on this line } end. --- end example --- ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com
participants (1)
-
Sam B