Format

La fonction Format('',[])

Cette fonction est une fonction super utile pour formater du texte

function Format( const Fmt: String; const Args: array of Const) : String;

function Format( const Fmt: String; const Args: array of Const; const FormatSettings: TFormatSettings) : String;

Exemple d'utilisation :

vS:=format('Item no %d = %s',[vIndex,vItemName]);

Types disponibles :

%d Decimal (integer)
%e Scientific
%f Fixed
%g General
%m Money
%n Number (floating)
%p Pointer
%s String
%u Unsigned decimal
%x Hexadecimal

Autres formats

Hexadecimal

Sources et Ressources

Vous pourriez laisser un commentaire si vous étiez connecté.