Delphi Tutorial


 

               Delphi Tutorial - Miscellaneous - Read parameters from command prompt

 

Download this example

This one counts and read command line parameters.

 

procedure TForm1.FormCreate(Sender: TObject);
Var
    I : Integer;
begin
    Memo1.Lines.Clear;
    Memo1.Lines.Add('Parameters Count : '+IntToStr(ParamCount));
    { ParamCount - Returns the number of parameters passed on
    the command line. }

    If ParamCount>0 Then
        For I:=1 To ParamCount Do
   
    { ParamStr - Returns a specified parameter from the command-line. }
        Memo1.Lines.Add('Parameter '+IntToStr(I)+' : '+ParamStr(I))
end;

 

DOWNLOAD this example

Click here to download this complete example for Delphi 6. (File size 6KB)

Go top

 


 

Previous Page First Page Next Page

 

 
Copyright © 2002 digitalcoding.com. All rights reserved.