mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 19:49:22 +02:00
+ integer is 4 bytes in Delphi and objfpc mode
This commit is contained in:
parent
48340afde3
commit
a1857ee34c
@ -3661,7 +3661,9 @@ implementation of a function/procedure. In particular, you can not omit the
|
|||||||
parameters when implementing the function or procedure.
|
parameters when implementing the function or procedure.
|
||||||
\item Overloading of functions is not allowed.
|
\item Overloading of functions is not allowed.
|
||||||
\item Nested comments are not allowed.
|
\item Nested comments are not allowed.
|
||||||
\item The Objpas unit is loaded right after the system unit.
|
\item The Objpas unit is loaded right after the system unit. One of the
|
||||||
|
consequences of this is that the type \var{Integer} is redefined as
|
||||||
|
\var{Longint}.
|
||||||
\end{enumerate}
|
\end{enumerate}
|
||||||
\section{GPC mode}
|
\section{GPC mode}
|
||||||
This mode is selected by the \var{{\$MODE GPC}} switch. On the command-line,
|
This mode is selected by the \var{{\$MODE GPC}} switch. On the command-line,
|
||||||
@ -3685,7 +3687,9 @@ implementation of a function/procedure. In particular, you can not omit the
|
|||||||
parameters when implementing the function or procedure.
|
parameters when implementing the function or procedure.
|
||||||
\item Overloading of functions is allowed.
|
\item Overloading of functions is allowed.
|
||||||
\item Nested comments are allowed.
|
\item Nested comments are allowed.
|
||||||
\item The Objpas unit is loaded right after the system unit.
|
\item The Objpas unit is loaded right after the system unit. One of the
|
||||||
|
consequences of this is that the type \var{Integer} is redefined as
|
||||||
|
\var{Longint}.
|
||||||
\item You can use the cvar type.
|
\item You can use the cvar type.
|
||||||
\item PChars are converted to strings automatically.
|
\item PChars are converted to strings automatically.
|
||||||
\end{enumerate}
|
\end{enumerate}
|
||||||
|
@ -488,7 +488,8 @@ The integer types, and their ranges and sizes, that are predefined in
|
|||||||
Type & Range & Size in bytes \\ \hline
|
Type & Range & Size in bytes \\ \hline
|
||||||
Byte & 0 .. 255 & 1 \\
|
Byte & 0 .. 255 & 1 \\
|
||||||
Shortint & -127 .. 127 & 1\\
|
Shortint & -127 .. 127 & 1\\
|
||||||
Integer & -32768 .. 32767 & 2 \\
|
Integer & -32768 .. 32767 & 2\footnote{The integer type is redefined as
|
||||||
|
longint if you are in Delphi or ObjFPC mode, and has then size 4} \\
|
||||||
Word & 0 .. 65535 & 2 \\
|
Word & 0 .. 65535 & 2 \\
|
||||||
Longint & -2147483648 .. 2147483648 & 4\\
|
Longint & -2147483648 .. 2147483648 & 4\\
|
||||||
Cardinal\footnote{The cardinal type support is buggy until version 0.99.6} & 0..4294967296 & 4 \\ \hline
|
Cardinal\footnote{The cardinal type support is buggy until version 0.99.6} & 0..4294967296 & 4 \\ \hline
|
||||||
|
Loading…
Reference in New Issue
Block a user