Runtime Type Information (RTTI)/fr
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'Voir aussi
From the Free Pascal wiki, page "Runtime Type Information (RTTI)/fr", as it stood on 2020-02-25 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.
Talk about this page
Nobody has opened a bench for this page yet. Sign in to open one.
