Difference between revisions of "period/fr"

From Lazarus wiki
Jump to navigationJump to search
m
 
(4 intermediate revisions by the same user not shown)
Line 47: Line 47:
  
 
== Fin de module ==
 
== Fin de module ==
The main block of any module, i. e. [[Program|<syntaxhighlight lang="pascal" inline>program</syntaxhighlight>]], [[Unit|<syntaxhighlight lang="pascal" inline>unit</syntaxhighlight>]] or [[Library|<syntaxhighlight lang="pascal" inline>library</syntaxhighlight>]], has to be closed with an [[End|<syntaxhighlight lang="pascal" inline>end</syntaxhighlight>]] “dot”:
+
Le bloc principal de tout module, i. e. [[Program/fr|<syntaxhighlight lang="pascal" inline>programme</syntaxhighlight>]], [[Unit/fr|<syntaxhighlight lang="pascal" inline>unité</syntaxhighlight>]] or [[Library/fr|<syntaxhighlight lang="pascal" inline>bibliothèque</syntaxhighlight>]] doit être terminée avec [[End/fr|<syntaxhighlight lang="pascal" inline>end</syntaxhighlight>]] “dot” :
  
 
<syntaxhighlight lang="pascal" highlight="5">
 
<syntaxhighlight lang="pascal" highlight="5">
Line 57: Line 57:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
It can be seen as an adoption of natural (written) languages, where a full stop marks an end of a sentence.
+
Ce qui peut être vu comme l'adoption des langages naturelle (écrit), où le point marque la fin d'une phrase.
  
Anything else after the final <syntaxhighlight lang="pascal" inline>end.</syntaxhighlight>, assuming syntactical correctness, will be ignored by the [[Compiler|compiler]].
+
Tout chose après le <syntaxhighlight lang="pascal" inline>end.</syntaxhighlight> final, en supposant la syntaxe correcte, sera ignoré par le [[Compiler/fr|compilateur]].
  
 
== Espace de nom ==
 
== Espace de nom ==
[[Unit]] names containing dots create [[Namespaces|namespaces]].
+
Les noms d'[[Unit/fr|unité]] contenant des points définissent des [[Namespaces/fr|espaces de noms]].
  
 
== Valeur ASCII ==
 
== Valeur ASCII ==
In [[ASCII]], the character code decimal <syntaxhighlight lang="pascal" inline>46</syntaxhighlight>  
+
En [[ASCII/fr|ASCII]], le caractère de code décimal <syntaxhighlight lang="pascal" inline>46</syntaxhighlight> (ou [[Hexadecimal/fr|hexadecimal]] <syntaxhighlight lang="pascal" inline>2E</syntaxhighlight>) est définie pour être <syntaxhighlight lang="pascal" inline>.</syntaxhighlight> (arrêt complet).
(or [[Hexadecimal|hexadecimal]] <syntaxhighlight lang="pascal" inline>2E</syntaxhighlight>) is defined to be
 
<syntaxhighlight lang="pascal" inline>.</syntaxhighlight> (full stop).
 
  
 
{{Symbols}}
 
{{Symbols}}
 +
 +
[[Category:Code/fr]]

Latest revision as of 20:22, 3 May 2020

English (en) suomi (fi) français (fr)

Séparateur décimal

Pascal utilise le . (point) pour séparer les parties entière et fractionnaire dans un nombre décimal.

myReal := 6.28318

Au moins un chiffre devant le point est obligatoire. Le cas échéant, 0 comme partie entière ne doit pas être omise.

Les nombres notés avec une base de numération non décimale ne peuvent être noté de cette façon.

P.ex. la valeur numérique "un demi" ne peut pas être écrite comme %0.1 (% étant la préfixe indiquant la notation binaire.

Sélecteur de portée d'un identificateur

Pour les types de données structurés, le point sépare l'identificateur de la structure de donnée de ses composants individuels i.e. les méthodes, les propriétés ou les champs de donnée.

 1program recordDemo(input, output, stderr);
 2
 3uses
 4	Linux;
 5
 6var
 7	info: TSysInfo;
 8begin
 9	if sysInfo(@info) <> 0 then
10	begin
11		halt(1);
12	end;
13	
14	writeLn('uptime: ', info.uptime, ' seconds');
15	
16	with info do
17	begin
18		writeLn('total free: ', freeram, ' bytes');
19	end;
20end.

Etendue

Deux points consécutifs .. spécifient une sous-étendue dans un type ordinal.

type
	signumCodomain = -1..1;

C'est la même que dans math.TValueSign.

Fin de module

Le bloc principal de tout module, i. e. programme, unité or bibliothèque doit être terminée avec end “dot” :

program hiWorld(input, output, stderr);

begin
	writeLn('Hi world!');
end.

Ce qui peut être vu comme l'adoption des langages naturelle (écrit), où le point marque la fin d'une phrase.

Tout chose après le end. final, en supposant la syntaxe correcte, sera ignoré par le compilateur.

Espace de nom

Les noms d'unité contenant des points définissent des espaces de noms.

Valeur ASCII

En ASCII, le caractère de code décimal 46 (ou hexadecimal 2E) est définie pour être . (arrêt complet).


Barre de navigation par sujet: Symboles Pascal
simples caractères

+ (plus)  •  - (moins)  •  * (astérique)  •  / (barre oblique)
= (égal à)  •  > (supérieur à)  •  < (inférieur à)
. (point)  •  : (deux-points)  •  ; (point-virgule)
^ (Chapeau)  •  @ (at)
$ (Dollar)  •  & (ampersand)  •  # (hash)
' (apostrophe)

Paires de caractères

<> (non égal à)  •  <= (moins ou égal à)  •  := (devient)  •  >= (supérieur ou égal à)

 •  >< (Différence symétrique)  •  // (Double barre oblique)