TCustomApplication.GetNonOptions function
Get all non-switch options.
Declaration
function GetNonOptions(const ShortOptions: string;
const Longopts: Array of string = string)
: TStringArray
procedure GetNonOptions(const ShortOptions: string;
const Longopts: Array of string = string;
NonOptions: TStrings)Arguments
ShortOptions | List of short options. |
Longopts | List of long options. |
NonOptions | Non options in the form of a string list. |
Function result
The list of non-options.
Description
GetNonOptions returns the items on the command-line that are not associated with a
switch. It checks the command-line for allowed switches as they are
indicated by
ShortOptions and
Longopts. The format is
identical to
Checkoptions.
This is useful for an application which accepts a command form such as
svn:
svn commit [options] files
In the above example, "commit" and "files" would be returned by GetNonOptions
The non-options are returned in the form of a string array, or a stringlist
instance can be passed in NonOptions. Either will be filled with the
non-options on return.
Errors
None.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
