Difference between revisions of "simple type"

From Free Pascal wiki
Jump to navigationJump to search
Line 1: Line 1:
A ''simple type'' is a single value which can be stored in an [[Identifier]]. Simple types are predefined by the compiler, but are not [[Reserved word|reserved words]]. While it is not recommended, they can be redefined. The simple types predefined by the compiler are:
+
A '''simple type''' is a single value which can be stored in an [[Identifier]]. Simple types are predefined by the compiler, but are not [[Reserved word|reserved words]]. While it is not recommended, they can be redefined.  
  
 +
Simple types predefined by the compiler are:
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
 
! name || bytes || comment
 
! name || bytes || comment
Line 9: Line 10:
 
|-  
 
|-  
 
| char || ''?'' || most likely 1
 
| char || ''?'' || most likely 1
|-
 
| currency || ''?'' ||
 
|-
 
| extended || ''?'' ||
 
 
|-  
 
|-  
 
| int8 || 1 || by definition
 
| int8 || 1 || by definition
Line 38: Line 35:
 
| qword || 8 || by definition
 
| qword || 8 || by definition
 
|-  
 
|-  
| pointer || ''?''
+
| pointer || ''?'' ||
 +
|-
 +
| single || ''?'' || single precision float
 +
|-
 +
| double || ''?'' || double precision float
 +
|-
 +
| extended || ''?'' || extended precision float
 +
|-
 +
| [[real]] || ''?'' ||
 
|-  
 
|-  
| real || ''?''
+
| currency || ''?'' ||
 
|}
 
|}
  
 
{{Data types}}
 
{{Data types}}

Revision as of 14:12, 24 November 2020

A simple type is a single value which can be stored in an Identifier. Simple types are predefined by the compiler, but are not reserved words. While it is not recommended, they can be redefined.

Simple types predefined by the compiler are:

name bytes comment
boolean ?
cardinal ?
char ? most likely 1
int8 1 by definition
int16 2 by definition
int32 4 by definition
int64 8 by definition
integer ?
shortint ? <= integer
smallint ? <= integer
longint ? >= integer
byte 1 by definition
word 2 by definition
dword 4 by definition
qword 8 by definition
pointer ?
single ? single precision float
double ? double precision float
extended ? extended precision float
real ?
currency ?


navigation bar: data types
simple data types

boolean byte cardinal char currency double dword extended int8 int16 int32 int64 integer longint real shortint single smallint pointer qword word

complex data types

array class object record set string shortstring