I think I'm seeing a problem in exporting an enumerated type from an Extended Pascal module.
My system is RedHat Linux release 5.2 (Apollo) running kernel 2.0.36 on an i586.
gpc -v reports as follows: ---------------------------------------------------------------------- Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnu/2.8.1/specs gpc version 19990118, based on gcc-2.8.1 --------------------------------------------------------------------
Below is a small module (dajmod2.p) and a program (daj2.p) which imports it. These have been cut down from a much bigger piece of code.
When compiling daj2.p the compiler reports: -------------------------------------------------------------------- daj2.p: In function `program_Daj2': daj2.p:7: incompatible types in assignment daj2.p:8: invalid operands to binary = --------------------------------------------------------------------
8<---- daj2.p ------------------------------------------------------ program daj2;
import progtypes in 'dajmod2.p'; globalvars in 'dajmod2.p';
begin pgmtype:=prog_press; if (pgmtype=prog_press) then writeln('OK') else writeln('Error'); end.
8<--- dajmod2.p ----------------------------------------------------- module dajmod2 interface;
export progtypes =(tprogtype, prog_none..prog_last); globalvars =(pgmtype);
TYPE TPROGTYPE=(prog_none, prog_press, prog_last);
VAR pgmtype:tprogtype;
end. {of module header}
module dajmod2 implementation;
end. {of module implentation} --------------------------------------------------------------------
If I embed just the TYPE and VAR declarations from dajmod2 within daj2, the program compiles and runs correctly.
-- David James mailto:david@tcs01.demon.co.uk