Difference between revisions of "Reserved words/fr"
m |
|||
Line 20: | Line 20: | ||
| [[And/fr|and]] || Opérateur booléen à True si les deux opérandes sont True | | [[And/fr|and]] || Opérateur booléen à True si les deux opérandes sont True | ||
|- | |- | ||
− | | [[array|array]] || | + | | [[array/fr|array]] || Eléments multiples avec le même nom |
|- | |- | ||
− | | [[asm|asm]] || | + | | [[asm/fr|asm]] || Début du code écrit en langage d'assemblage |
|- | |- | ||
− | | [[begin|begin]] || | + | | [[begin/fr|begin]] || Début d'un [[block/fr|bloc]] de code |
|- | |- | ||
− | | [[break|break]] || | + | | [[break/fr|break]] || Sortie d'une instruction case |
|- | |- | ||
− | | [[Case|case]] || | + | | [[Case/fr|case]] || Choisir un segment de code particulier pour l'exécuter selon une valeur |
|- | |- | ||
− | | [[const|const]] || | + | | [[const/fr|const]] || Déclarer un identificateur avec une valeur fixée, ou une variable avec une valeur initialisée |
|- | |- | ||
− | | [[constructor|constructor]] || | + | | [[constructor/fr|constructor]] || Routine utilisée pour initialiser un objet |
|- | |- | ||
− | | [[Continue|continue]] || | + | | [[Continue/fr|continue]] || Saute une itération dans une boucle for et poursuit l'exécution au début de la boucle |
|- | |- | ||
− | | [[destructor|destructor]] || | + | | [[destructor/fr|destructor]] || Routine utilisée avant la désallocation d'un objet |
|- | |- | ||
− | | [[div|div]] || | + | | [[div/fr|div]] || Opérateur de division entière |
|- | |- | ||
− | | [[Do|do]] || | + | | [[Do/fr|do]] || Utilisé pour indiquer le début d'une boucle (for/while) |
|- | |- | ||
− | | [[downto|downto]] || | + | | [[downto/fr|downto]] || Dans une boucle, utilisé pour indiquer que l'index est décrémenté |
|- | |- | ||
− | | [[Else|else]] || | + | | [[Else/fr|else]] || Utilisé dans une instruction [[if/fr|if]] pour fournir un chemin d'exécution quand le test échoue |
|- | |- | ||
− | | [[End|end]] || | + | | [[End/fr|end]] || Fin d'un bloc de code, un enregistrement ou certaines constructions |
|- | |- | ||
− | | [[false|false]] || | + | | [[false/fr|false]] || Valeur booléenne indiquant qu'une test échoue ; contraire de [[true/fr|true]] |
|- | |- | ||
− | | [[file|file]] || | + | | [[file/fr|file]] || structure de données externe, généralement stocké sur disque |
|- | |- | ||
− | | [[for|for]] || loop used to increment or decrement a control variable | + | | [[for/fr|for]] || loop used to increment or decrement a control variable |
|- | |- | ||
− | | [[Function|function]] || define start of a routine that returns a result value | + | | [[Function/fr|function]] || define start of a routine that returns a result value |
|- | |- | ||
− | | [[goto|goto]] || used to exit a segment of code and jump to another point | + | | [[goto/fr|goto]] || used to exit a segment of code and jump to another point |
|- | |- | ||
− | | [[If|if]] || test a condition and perform a set of instructions based on the result | + | | [[If/fr|if]] || test a condition and perform a set of instructions based on the result |
|- | |- | ||
| [[Implementation|implementation]] || define the internal routines in [[unit]] | | [[Implementation|implementation]] || define the internal routines in [[unit]] | ||
|- | |- | ||
− | | [[In|in]] || identifies elements in a collection | + | | [[In/fr|in]] || identifies elements in a collection |
|- | |- | ||
− | | [[inline|inline]] || machine code inserted directly into a routine | + | | [[inline/fr|inline]] || machine code inserted directly into a routine |
|- | |- | ||
− | | [[Interface|interface]] || public declarations of routines in a [[unit]] | + | | [[Interface/fr|interface]] || public declarations of routines in a [[unit]] |
|- | |- | ||
− | | [[label|label]] || defines the target jump point for a [[goto]] | + | | [[label/fr|label]] || defines the target jump point for a [[goto]] |
|- | |- | ||
− | | [[mod|mod]] || operator used to return the remainder of an integer division | + | | [[mod/fr|mod]] || operator used to return the remainder of an integer division |
|- | |- | ||
− | | [[nil|nil]] || pointer value indicating the pointer does not contain a value | + | | [[nil/fr|nil]] || pointer value indicating the pointer does not contain a value |
|- | |- | ||
− | | [[Not|not]] || boolean operator that negates the result of a test | + | | [[Not/fr|not]] || boolean operator that negates the result of a test |
|- | |- | ||
− | | [[Object|object]] || defines an object construct | + | | [[Object/fr|object]] || defines an object construct |
|- | |- | ||
− | | [[Of|of]] || defines the characteristics of a variable | + | | [[Of/fr|of]] || defines the characteristics of a variable |
|- | |- | ||
− | | [[On|on]] || | + | | [[On/fr|on]] || |
|- | |- | ||
− | | [[operator|operator]] || defines a routine used to implement an operator | + | | [[operator/fr|operator]] || defines a routine used to implement an operator |
|- | |- | ||
− | | [[Or|or]] || boolean operator which allows either of two choices to be used | + | | [[Or/fr|or]] || boolean operator which allows either of two choices to be used |
|- | |- | ||
− | | [[packed|packed]] || indicates the elements of an array are to use less space (this keyword is primarily for compatibility with older programs as packing of array elements is generally automatic) | + | | [[packed/fr|packed]] || indicates the elements of an array are to use less space (this keyword is primarily for compatibility with older programs as packing of array elements is generally automatic) |
|- | |- | ||
− | | [[Procedure|procedure]] || define start of a routine that does not return a result value | + | | [[Procedure/fr|procedure]] || define start of a routine that does not return a result value |
|- | |- | ||
− | | [[Program|program]] || defines start of an application. This keyword is usually optional. | + | | [[Program/fr|program]] || defines start of an application. This keyword is usually optional. |
|- | |- | ||
− | | [[Record|record]] || group a series of variables under a single name | + | | [[Record/fr|record]] || group a series of variables under a single name |
|- | |- | ||
− | | [[Repeat|repeat]] || loop through a section of code through an [[until]] statement as long as the result of the test is true | + | | [[Repeat/fr|repeat]] || loop through a section of code through an [[until]] statement as long as the result of the test is true |
|- | |- | ||
− | | [[Set|set]] || group a collection | + | | [[Set/fr|set]] || group a collection |
|- | |- | ||
− | | [[Shl|shl]] || operator to shift a value to the left; equivalent to multiplying by a power of 2 | + | | [[Shl/fr|shl]] || operator to shift a value to the left; equivalent to multiplying by a power of 2 |
|- | |- | ||
− | | [[Shr|shr]] || operator to shift a value to the right; equivalent to dividing by a power of 2 | + | | [[Shr/fr|shr]] || operator to shift a value to the right; equivalent to dividing by a power of 2 |
|- | |- | ||
− | | [[String|string]] || declares a variable that contains multiple characters | + | | [[String/fr|string]] || declares a variable that contains multiple characters |
|- | |- | ||
− | | [[Then|then]] || indicates start of code in an [[if]] test | + | | [[Then/fr|then]] || indicates start of code in an [[if]] test |
|- | |- | ||
− | | [[to|to]] || indicates a [[for]] variable is to be incremented | + | | [[to/fr|to]] || indicates a [[for]] variable is to be incremented |
|- | |- | ||
− | | [[true|true]] || boolean value indicating a test succeeded; opposite of [[false]] | + | | [[true/fr|true]] || boolean value indicating a test succeeded; opposite of [[false]] |
|- | |- | ||
− | | [[type|type]] || declares kinds of records or new classes of variables | + | | [[type/fr|type]] || declares kinds of records or new classes of variables |
|- | |- | ||
− | | [[Unit|unit]] || separately compiled module | + | | [[Unit/fr|unit]] || separately compiled module |
|- | |- | ||
− | | [[Until|until]] || indicates end test of a [[repeat]] statement | + | | [[Until/fr|until]] || indicates end test of a [[repeat]] statement |
|- | |- | ||
− | | [[Uses|uses]] || names [[unit]]s this program or unit refers to | + | | [[Uses/fr|uses]] || names [[unit]]s this program or unit refers to |
|- | |- | ||
− | | [[Var|var]] || declare variables | + | | [[Var/fr|var]] || declare variables |
|- | |- | ||
− | | [[While|while]] || test a value and if true, loop through a section of code | + | | [[While/fr|while]] || test a value and if true, loop through a section of code |
|- | |- | ||
− | | [[With|with]] || reference the internal variables within a record without having to refer to the record itself | + | | [[With/fr|with]] || reference the internal variables within a record without having to refer to the record itself |
|- | |- | ||
− | | [[Xor|xor]] || boolean operator used to invert an [[or]] test | + | | [[Xor/fr|xor]] || boolean operator used to invert an [[or]] test |
|} | |} | ||
Revision as of 18:34, 8 July 2014
│
Deutsch (de) │
English (en) │
français (fr) │
polski (pl) │
русский (ru) │
中文(中国大陆) (zh_CN) │
Les mots-clés des modes du compilateur sont résumés comme suit:
- modeTurbo Pascal: Les mots-clés du Turbo Pascal sont disponibles pour votre usage
- mode Delphi: Les mots-clés du Turbo Pascal et du Pascal Object sont disponibles pour votre usage
- mode Free Pascal: Les mots-clés du Turbo Pascal et du Pascal Object sont disponibles pour votre usage
Note: Les termes mot-clé et mot réservé sont utilisé de manière interchangeables ici est-ce correct ?
A faire: insérer des explications/liens vers le manuel en ligne de Free Pascal sur ce que ce sont les mots réservés/mots-clés: par exemple pouvez-vous appeler vos variables "if" etc
A faire: Créer des pages pour les mots-clés s'ils n'existent pas encore (par exemple, traduire depuis la version allemande) et un lien vers la section sur les mots-clés du manuel en ligne de Free Pascal sur ces pages.
Mots réservés en Turbo Pascal
Les mots-clé suivants se rencontrent dans le mode Turbo Pascal:
mot-clé | description |
---|---|
and | Opérateur booléen à True si les deux opérandes sont True |
array | Eléments multiples avec le même nom |
asm | Début du code écrit en langage d'assemblage |
begin | Début d'un bloc de code |
break | Sortie d'une instruction case |
case | Choisir un segment de code particulier pour l'exécuter selon une valeur |
const | Déclarer un identificateur avec une valeur fixée, ou une variable avec une valeur initialisée |
constructor | Routine utilisée pour initialiser un objet |
continue | Saute une itération dans une boucle for et poursuit l'exécution au début de la boucle |
destructor | Routine utilisée avant la désallocation d'un objet |
div | Opérateur de division entière |
do | Utilisé pour indiquer le début d'une boucle (for/while) |
downto | Dans une boucle, utilisé pour indiquer que l'index est décrémenté |
else | Utilisé dans une instruction if pour fournir un chemin d'exécution quand le test échoue |
end | Fin d'un bloc de code, un enregistrement ou certaines constructions |
false | Valeur booléenne indiquant qu'une test échoue ; contraire de true |
file | structure de données externe, généralement stocké sur disque |
for | loop used to increment or decrement a control variable |
function | define start of a routine that returns a result value |
goto | used to exit a segment of code and jump to another point |
if | test a condition and perform a set of instructions based on the result |
implementation | define the internal routines in unit |
in | identifies elements in a collection |
inline | machine code inserted directly into a routine |
interface | public declarations of routines in a unit |
label | defines the target jump point for a goto |
mod | operator used to return the remainder of an integer division |
nil | pointer value indicating the pointer does not contain a value |
not | boolean operator that negates the result of a test |
object | defines an object construct |
of | defines the characteristics of a variable |
on | |
operator | defines a routine used to implement an operator |
or | boolean operator which allows either of two choices to be used |
packed | indicates the elements of an array are to use less space (this keyword is primarily for compatibility with older programs as packing of array elements is generally automatic) |
procedure | define start of a routine that does not return a result value |
program | defines start of an application. This keyword is usually optional. |
record | group a series of variables under a single name |
repeat | loop through a section of code through an until statement as long as the result of the test is true |
set | group a collection |
shl | operator to shift a value to the left; equivalent to multiplying by a power of 2 |
shr | operator to shift a value to the right; equivalent to dividing by a power of 2 |
string | declares a variable that contains multiple characters |
then | indicates start of code in an if test |
to | indicates a for variable is to be incremented |
true | boolean value indicating a test succeeded; opposite of false |
type | declares kinds of records or new classes of variables |
unit | separately compiled module |
until | indicates end test of a repeat statement |
uses | names units this program or unit refers to |
var | declare variables |
while | test a value and if true, loop through a section of code |
with | reference the internal variables within a record without having to refer to the record itself |
xor | boolean operator used to invert an or test |
Reserved words in Object Pascal
Object Pascal extends the (Turbo) Pascal language with both support for dealing more easily with objects (object orientation) as well as other newer/more advanced concepts (threads, etc).
In addition to the reserved words in Turbo Pascal, the following reserved words are available in Delphi mode as well:
as
class
dispose
except
exit
exports
finalization
finally
inherited
initialization
is
library
new
on
out
property
raise
self
threadvar
try
Reserved words in Free Pascal
The reserved words in Free Pascal mode include:
- Turbo Pascal mode reserved words
- Object Pascal mode reserved words
Modifiers (directives)
The list below is a list of modifiers
Modifiers are not strictly reserved words; however they are used in the same way as reserved words.
See the Free Pascal manual for details.
absolute
abstract
alias
assembler
cdecl
cppdecl
default
export
external
forward
index
local
name
nostackframe
oldfpccall
override
pascal
private
protected
public
published
read
register
reintroduce
safecall
softfloat
stdcall
virtual
write
Unsupported Turbo Pascal modifiers
The reason why these modifiers are not support is that these modifiers deal with 16 bit code
In other words, these modifiers have special meaning for 16 bit programming under DOS and Windows 3.x
As Free Pascal does not support 16 bit code (only 32 and 64 bit), these modifiers are irrelevant in Free Pascal code
far
near
More functionality
Apart from the language features provided by the reserved words/keywords mentioned above, there is a lot of functionality available for the programmer in the various libraries:
- RTL: Run-Time Library, available for all FPC and Lazarus programs
- FCL: Free Component Library: a core set of libraries available for Lazarus programs and usually for FPC (FPC can be compiled without it, but that only happens on purpose for low-memory embedded systems etc)
- FPC Packages: other packages provided by FPC
- Lazarus components: these are Lazarus components that can be dropped on a form and often based on FCL or FPC packages
- Lazarus utility functions: e.g. the fileutil unit.
Apart from the libraries provided by FPC and Lazarus, there are more libraries/components available:
- FPC user-supplied units: see the FPC wiki
- Lazarus CCR: components
- User-supplied code on the internet: see