Difference between revisions of "Runtime Type Information (RTTI)/fr"
From Free Pascal wiki
Jump to navigationJump to searchm |
|||
Line 1: | Line 1: | ||
{{Editing Runtime Type Information (RTTI)}}<p> | {{Editing Runtime Type Information (RTTI)}}<p> | ||
− | RTTI peut être employée pour obtenir un nombre de méta informations dans une application Pascal. | + | La RTTI peut être employée pour obtenir un nombre de méta-informations dans une application Pascal. |
__TOC__ | __TOC__ | ||
− | == Conversion d'un type énuméré en | + | == Conversion d'un type énuméré en chaîne == |
− | On peut utiliser la RTTI pour obtenir | + | On peut utiliser la RTTI pour obtenir la chaîne d'un type énuméré. |
<syntaxhighlight> | <syntaxhighlight> | ||
Line 21: | Line 21: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | == | + | ==Voir aussi== |
*[[RTTI controls/fr|Contrôles RTTI]] | *[[RTTI controls/fr|Contrôles RTTI]] | ||
* http://www.blong.com/Conferences/BorConUK98/DelphiRTTI/CB140.htm | * http://www.blong.com/Conferences/BorConUK98/DelphiRTTI/CB140.htm |
Revision as of 12:53, 19 April 2015
│ English (en) │ français (fr) │ русский (ru) │
La RTTI peut être employée pour obtenir un nombre de méta-informations dans une application Pascal.
Conversion d'un type énuméré en chaîne
On peut utiliser la RTTI pour obtenir la chaîne d'un type énuméré.
type
TProgrammerType = (tpDelphi, tpVisualC, tpVB, tpJava) ;
uses TypInfo;
var
s: string;
begin
s := GetEnumName(TypeInfo(TProgrammerType), integer(tpDelphi));
// Ici = 'tpDelphi'