◄Summary► ◄Details► ◄Example► ◄Back► Argument index Location of desired parameter in parameter list from command line Returns STRING Parameter at specified index in parameter list Description The ParamStr function returns a string that contains a selected parameter from the command line executing the current program. The index argument gives the place of the desired parameter in the parameter list, separated by spaces or tabs. Pass an integer in the range from 0 to the maximum number of parameters. Use the ParamCount function to determine the number of parameters passed to the program. A command to execute a program passes zero or more command-line parameters. These parameters communicate information to be used by the program. Execute a program either by entering the program name plus parameters at the DOS command-line prompt or by passing the program name and parameters to the Exec procedure. Separate the command-line parameters with spaces or tabs. If the index argument is invalid, ParamStr returns a null (empty) string. A negative value or a value greater than the return value of ParamCount is an invalid value. For a program running under DOS version 3.0 or later, a call to ParamStr with an index of 0 returns the full pathname of the executable file for the current program. For a DOS version earlier than 3.0, an index of 0 is an invalid value.