Variable conformant arrays, and the price of fish...
Mon, 18 Aug 1997 17:48:16 +0100 (BST)
Hi,
Sorry to bother you all, but I'm having some trouble getting the
above to work. I am using gpc as a cross compiler from i586-unknown-linux
to m68k-coff and everything is looking great. I'm trying hard to get
Oregon Pascal code to compile, [ has anyone else had to use this variant,
UNIV parameters / loophole, ref etc. ? ], anyhow here is a code fragment :
PROGRAM test (input, output) ;
PROCEDURE print_str (name: PACKED ARRAY [lo..hi: integer] OF Char) ; {a}
{PROCEDURE print_str (name: String) ;} {b}
BEGIN
writeln ('lo : ',lo,'Hi : ',hi) ; {a}
{writeln (name) ;} {b}
END ;
BEGIN
print_str ('Hello Mate') ;
END.
It compiles to object fine with the {b} labeled code in, but the
{a} labeled code causes a crash :
>m68k-coff-gpc -c test.pas
m68k-coff-gpc: Internal compiler error: program gpc1 got fatal signal 6
Is this perhaps one section of the ISO 10206 spec. that isn't
implemented yet ? or am I doing something extremely daft :-)
Oh, and while I'm being stupid I'm having problems creating a
32bit unsigned type which is quite important for the embedded application.
There is probably a far better way of doing it than this :
TYPE
ulong = 0..16#FFFFFFFF ;
As this apparently shows that :
./p.def1:14: subrange bounds are not of the same type
Thanks in advance for any help, its a great project, keep up the
good work.
Regards,
Michael Meeks.
Michael Meeks (michael@zeus.imaginator.com)
HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada -
Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es