Unit 'CustApp' Package
[Overview][Types][Classes][Variables][Index] [#fcl]

TCustomApplication.GetNonOptions

Get all non-switch options.

Declaration

Source position: custapp.pp line 90

public function TCustomApplication.GetNonOptions(

  const ShortOptions: string;

  const Longopts: array of string

):TStringArray;

procedure TCustomApplication.GetNonOptions(

  const ShortOptions: string;

  const Longopts: array of string;

  NonOptions: TStrings

);

Arguments

ShortOptions

  

List of short options.

Longopts

  

List of long options.

Function result

The list of non-options.

Arguments

ShortOptions

  

List of short options.

Longopts

  

List of long options.

NonOptions

  

Non options in the form of a string list.

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

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.


Documentation generated on: Nov 23 2024