Copie du wikimiroir

Ceci est un miroir du wiki de pascal.chat. La modification, l’historique et la connexion se trouvent là-bas.

Hint Directives/fr

English · Français · Suomi

Utilisation des directives de conseil

Chaque fois qu'un identificateur marqué par une directive de conseil est rencontré par le compilateur, un avertissement sera affiché, correspondant au conseil spécifié.

Soient les exemples suivants : The following are examples:

pascal
Const  
  AConst = 12 deprecated;  
 
var  
  p : integer platform;  
 
Function Something : Integer; experimental;  
 
begin  
  Something:=P+AConst;  
end;  
 
begin  
  Something;  
end.

Il en résulte les sorties suivantes :

pascal
testhd.pp(11,15) Warning: Symbol "p" is not portable  
testhd.pp(11,22) Warning: Symbol "AConst" is deprecated  
testhd.pp(15,3) Warning: Symbol "Something" is experimental

Les directives de conseil peuvent suivre toutes sortes d'identificateurs : unités, constantes, types, variables, fonctions, procédures et méthodes.


From the Free Pascal wiki, page "Hint Directives/fr", as it stood on 2020-02-17 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Version 1, dernière modification par WikiArchive .