Integer types: There is no built-in Byte, Word, etc. in GNU
Pascal. Use the modifiers `__byte__', `__short__',
`__long__' and `__unsigned__' (described in
See section GNU Pascal extensions) to define them.
Borland Pascal GNU Pascal
shortint __byte__ Integer
Integer __short__ Integer
LongInt Integer = __long__ Integer
Comp __longlong__ Integer
Byte __unsigned__ __byte__ Integer
Word __unsigned__ __short__ Integer
- __unsigned__ __long__ Integer
- __unsigned__ __longlong__ Integer
Real types: There is no built-in `Single', `Double',
`Extended' in GNU Pascal; Real has 8 bytes on an Intel-x86
machine. Use `__short__ Real' to define `Single',
`__long__ Real' to define `Extended'.
Borland Pascal GNU Pascal
Single __short__ Real
Real -
Double Real
Extended __long__ Real
Comp __longlong__ Integer
A KNOWN BUG: You cannot writeln
variables of a type with a
__
modifier. To work around, cast them to their basis type
(Integer or Real) when writeln
ing them:
Var
x: __long__ Real;
writeln ( Real ( x ) );