I'm having problems with a string in a record that is exported from one module and imported into another. I *hope* I am doing something stupid!
The maodule (dajmod3.pas) and main program (daj3.pas) below should illustrate the problem.
This is on a system which identifies itself as Eridani / Red Hat Linux 6.0 (Hedwig) Kernel 2.2.5-15 on an i586
The output of gpc -v is
Reading specs from /usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/specs gpc version 19991030, based on 2.95.2 19991024 (release)
daj3.pas: ======== program daj3(output);
import globaltypes in 'dajmod3.pas'; globalvars in 'dajmod3.pas';
begin shared_data.prefix:='ABCD'; if (shared_data.prefix='ABCD') then writeln('OK') else writeln('failed ',shared_data.prefix,'|'); end.
dajmod3.pas: =========== module dajmod3 interface;
export globaltypes =(astring); globalvars =(shared_data);
TYPE astring=string(255);
VAR shared_data : record prefix:astring; end;
end. {of module header}
module dajmod3 implementation;
end. {of module implentation}