Command-line arguments is part of Short Circuit's Console Program Basics selection.
Scripted main
See also Program name.

For parsing command line arguments intelligently, see Parsing command-line arguments.

Example command line:

myprogram -c "alpha beta" -h "gamma"

 
Program listArguments(input, output, stdErr);
 
Var 
  i: integer;
Begin
  writeLn('program was called from: ',paramStr(0));
  For i := 1 To paramCount() Do
    Begin
      writeLn('argument',i:2,' : ', paramStr(i));
    End;
End.
 