« ParamStr (rtl) » : différence entre les versions
Aucun résumé des modifications |
Aucun résumé des modifications |
||
Ligne 1 : | Ligne 1 : | ||
<source lang='delphi'>Function ParamStr(index:Integer):String;</source> | <source lang='delphi'>Function ParamStr(index:Integer):String;</source> | ||
Cette fonction retrouve un paramètre du programme. | Cette fonction retrouve un paramètre passé sur la ligne de commande du programme. | ||
{|class="wikitable" | {|class="wikitable" | ||
Ligne 9 : | Ligne 9 : | ||
|- | |- | ||
|index | |index | ||
|Index du paramètre. | |Index du paramètre. (1...) | ||
|} | |} | ||
Ligne 15 : | Ligne 15 : | ||
<source lang='delphi'> | <source lang='delphi'> | ||
function IsInDebug:boolean; | |||
var idx:Integer; | |||
begin | begin | ||
for idx:=1 to ParamCount-1 do | |||
if ParamStr(i)='-debug' then | |||
begin | |||
Result := True; | |||
Exit; | |||
end; | |||
Result := False; | |||
end; | end; | ||
</source> | </source> | ||
Voir aussi: | Voir aussi: | ||
*[[ParamCount (rtl)|ParamCount]] | |||
{{Footer|Développement DSM}} | {{Footer|Développement DSM}} | ||
[[category:RTL Application]] | [[category:RTL Application]] | ||
Dernière version du 11 août 2009 à 13:56
<source lang='delphi'>Function ParamStr(index:Integer):String;</source>
Cette fonction retrouve un paramètre passé sur la ligne de commande du programme.
Result | Une chaine de caractère. |
index | Index du paramètre. (1...) |
Exemple
<source lang='delphi'> function IsInDebug:boolean; var idx:Integer; begin
for idx:=1 to ParamCount-1 do if ParamStr(i)='-debug' then begin Result := True; Exit; end; Result := False;
end; </source>
Voir aussi:
{{#if:Développement DSM|
{{#if:Développement DSM|— Développement DSM |}} — Développement DSM —
|
{{#if:|— [[{{{1}}}]] |}} — Développement DSM —
}}