Class ACommandLineNumber

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type ACommandLineNumber = class(ACommandLineOption)

Description

This class represents an option that expectas a numeric value.

The value of the number that can be assigned to the option is limited only by the precision of the int64 and double types; to further constrain the values which may be entered by the user, one can instead use an instance of ACommandLineIntegerRange, ACommandLineFloatRange, or ACommandLineChoice.

Hierarchy

Overview

Methods

Public function init: boolean; override;
Public function setValue(const newValue: Variant; const makeDirty: boolean = true): Variant; override;

Description

Methods

Public function init: boolean; override;

Initializer

Public function setValue(const newValue: Variant; const makeDirty: boolean = true): Variant; override;

Set the value of the option.

This method overrides the behavior inherited from ACommandLineOption.setValue; it attempts to cast newValue to a numeric value. If that succeeds, the new value is set; otherwise it is ignored and an exception is thrown.

Returns

The previous value of ACommandLineNumber.value.

Exceptions raised
AnOptionValueError
in the event that the attempt to cast newValue to a numeric value fails.

Generated by PasDoc 0.13.0 on 2015-06-25 11:07:51