I don't unterstand __byte__ :-(_(re)
Thu, 12 Sep 1996 11:40:07 +0200 (MET DST)
Hi all,
> const
> arHex : array[0..$0f] of char
> = '0123456789abcdef';
Nice that this works. I was sure it wouldn't work. ;-)
> a8 : array[0..max] of __byte__ Integer absolute a32;
>
> write(a8[i]: 10);
> 1 1 34561
>
> write(hexa(a8[i]));
> 1 $00000001 $00000001
Symptoms: the value of a __byte__ Integer is written correctly
via the "hexa" function, it's wrong when we simply "write" it.
This is due to a BUG in GPC's run tims system (RTS) which doesn't
(yet) know about type modifiers like __byte__ at all. :-(
For the same reason, you get run time errors when you try to
writeln __longlong__ (64-bit) Integers (\approx Comp in BP)
or __long__ Reals (Extended in BP).
To work around, do an explicit type cast:
> write ( Integer ( a8 [ i ] ) : 10 );
> 1 1 1
Bye,
Peter
e-mail: peter.gerwinski@uni-essen.de
home address: D\"usseldorfer Str. 35, 45145 Essen, Germany
WWW: http://agnes.dida.physik.uni-essen.de/~peter/
Peter Gerwinski (peter@agnes.dida.physik.uni-essen.de)
HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada -
Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es