TCustomApplication.GetNonOptions¶
Get all non-switch options.
Declaration¶
Source position: custapp.pp line 93
public
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);
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 TCustomApplication.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¶
| Name | Description |
|---|---|
| TCustomApplication.HasOption | Check whether an option was specified. |
| TCustomApplication.Checkoptions | Check whether all given options on the command-line are valid. |
| TCustomApplication.GetOptionValue | Return the value of a command-line option. |
| TCustomApplication.GetOptionValues | Get the values for an option that may be specified multiple times. |