mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-08 21:09:30 +02:00
+ added longword type definition
This commit is contained in:
parent
0b561daa54
commit
136181415c
47
docs/ref.tex
47
docs/ref.tex
@ -549,6 +549,7 @@ Integer \\
|
|||||||
Shortint \\
|
Shortint \\
|
||||||
SmallInt \\
|
SmallInt \\
|
||||||
Longint \\
|
Longint \\
|
||||||
|
Longword \\
|
||||||
Int64 \\
|
Int64 \\
|
||||||
Byte \\
|
Byte \\
|
||||||
Word \\
|
Word \\
|
||||||
@ -566,36 +567,42 @@ Type & Range & Size in bytes \\ \hline
|
|||||||
Byte & 0 .. 255 & 1 \\
|
Byte & 0 .. 255 & 1 \\
|
||||||
Shortint & -128 .. 127 & 1\\
|
Shortint & -128 .. 127 & 1\\
|
||||||
Smallint & -32768 .. 32767 & 2\\
|
Smallint & -32768 .. 32767 & 2\\
|
||||||
Integer & either smallint, longint or int64 & size 2,4 or 8 \\
|
|
||||||
Word & 0 .. 65535 & 2 \\
|
Word & 0 .. 65535 & 2 \\
|
||||||
|
Integer & either smallint, longint or int64 & size 2,4 or 8 \\
|
||||||
|
Cardinal & either word, longword or qword & size 2,4 or 8 \\
|
||||||
Longint & -2147483648 .. 2147483647 & 4\\
|
Longint & -2147483648 .. 2147483647 & 4\\
|
||||||
Cardinal & 0..4294967295 & 4 \\
|
Longword & 0..4294967295 & 4 \\
|
||||||
Int64 & -9223372036854775808 .. 9223372036854775807 & 8 \\
|
Int64 & -9223372036854775808 .. 9223372036854775807 & 8 \\
|
||||||
QWord & 0 .. 18446744073709551615 & 8 \\ \hline
|
QWord & 0 .. 18446744073709551615 & 8 \\ \hline
|
||||||
\end{FPCltable}
|
\end{FPCltable}
|
||||||
|
|
||||||
The \var{integer} type maps to the smallint type in the default
|
The \var{integer} type maps to the smallint type in the default
|
||||||
\fpc mode. It maps to either a longint or int64 in either Delphi or ObjFPC
|
\fpc mode. It maps to either a longint or int64 in either Delphi or ObjFPC
|
||||||
mode. This is summarized in \seet{integer32type} for 32-bit processors
|
mode. The \var{cardinal} type is currently always mapped to the
|
||||||
(such as Intel 80x86, Motorola 680x0, PowerPC 32-bit, SPARC v7, MIPS32), and
|
longword type.
|
||||||
in \seet{integer64type} for 64-bit processors (such as Alpha AXP,
|
|
||||||
SPARC v9 or later, Intel Itanium, MIPS64).
|
|
||||||
|
|
||||||
\begin{FPCltable}{lcr}{\var{Integer} type mapping for 32-bit processors}{integer32type}
|
% This IS NOT TRUE, this is a 32-bit compiler, so the integer type
|
||||||
Compiler mode & Range & Size in bytes \\ \hline
|
% will always be the same independently the CPU type.
|
||||||
<default> & -32768 .. 32767 & 2\\
|
%This is summarized in \seet{integer32type} for 32-bit processors
|
||||||
tp & -32768 .. 32767 & 2\\
|
%(such as Intel 80x86, Motorola 680x0, PowerPC 32-bit, SPARC v7, MIPS32), and
|
||||||
Delphi & -2147483648 .. 2147483647 & 4\\
|
%in \seet{integer64type} for 64-bit processors (such as Alpha AXP,
|
||||||
ObjFPC & -2147483648 .. 2147483647 & 4\\
|
%SPARC v9 or later, Intel Itanium, MIPS64).
|
||||||
\end{FPCltable}
|
|
||||||
|
|
||||||
\begin{FPCltable}{lcr}{\var{Integer} type mapping for 64-bit processors}{integer64type}
|
%\begin{FPCltable}{lcr}{\var{Integer} type mapping for 32-bit processors}{integer32type}
|
||||||
Compiler mode & Range & Size in bytes \\ \hline
|
%Compiler mode & Range & Size in bytes \\ \hline
|
||||||
<default> & -32768 .. 32767 & 2\\
|
%<default> & -32768 .. 32767 & 2\\
|
||||||
tp & -32768 .. 32767 & 2\\
|
%tp & -32768 .. 32767 & 2\\
|
||||||
Delphi & -9223372036854775808 .. 9223372036854775807 & 8 \\
|
%Delphi & -2147483648 .. 2147483647 & 4\\
|
||||||
ObjFPC & -9223372036854775808 .. 9223372036854775807 & 8 \\
|
%ObjFPC & -2147483648 .. 2147483647 & 4\\
|
||||||
\end{FPCltable}
|
%\end{FPCltable}
|
||||||
|
|
||||||
|
%\begin{FPCltable}{lcr}{\var{Integer} type mapping for 64-bit processors}{integer64type}
|
||||||
|
%Compiler mode & Range & Size in bytes \\ \hline
|
||||||
|
%<default> & -32768 .. 32767 & 2\\
|
||||||
|
%tp & -32768 .. 32767 & 2\\
|
||||||
|
%Delphi & -9223372036854775808 .. 9223372036854775807 & 8 \\
|
||||||
|
%ObjFPC & -9223372036854775808 .. 9223372036854775807 & 8 \\
|
||||||
|
%\end{FPCltable}
|
||||||
|
|
||||||
\fpc does automatic type conversion in expressions where different kinds of
|
\fpc does automatic type conversion in expressions where different kinds of
|
||||||
integer types are used.
|
integer types are used.
|
||||||
|
Loading…
Reference in New Issue
Block a user