Input number formats

#(min, max)

#(min, max]

#[min, max}

#[min, max]

# — used to represent one of the following number types:

i : integer number that may be positive or negative, does not contain a decimal point

n : any number, positive or negative and may contain a decimal point.

The value range or precision of the number is limited by the operating system.

The valid number range is typically:

i : -2,147,483,648 to 2,147,483,647

n : 1.7 E +/- 308 ( 15 digits )

The min and max values define the range of the number value.

The value of min and max must be consistent with the number type. For example if the number type is i, both min and max must be a valid integer number.

The character * may be used in place of min or max and represents an infinite value or no limit.

The max value must be greater or equal to the min value.

( : input value must be greater than min.

) : input value must be less than max.

[ : input value must be greater than or equal to min.

] : input value must be less than or equal to max.

Examples

i

Description — any integer number.

Valid input examples

123

-456

Invalid input examples

123.456

must be integer. Decimal values are not allowed

-123.

integer values cannot have a decimal point

 

n

Description – any integer or decimal number

Valid input examples

123

123.456

-123.

#(min, max) — used to specify a value that is greater than min and less than max.

Examples

i(-100, 100)

Description — any integer number greater than –100 and less than 100

Valid input examples

-99

0

99

Invalid input examples

-100

too small, must be greater than –100

-99.9

must be an integer (decimal not allowed)

100

too large, must be less than 100

 

#(min, max] — used to specify a value that is greater than min and less than or equal to max.

Examples

i(-100, 100]

Description — any integer number greater than –100 and less than or equal to 100

Valid input examples

-99

0

100

Invalid input examples

-100

too small, must be greater than –100

-99.9

must be an integer (decimal not allowed)

100

too large, must be less than 100

 

#[min, max) — used to specify a value that is greater than or equal to min and less than max.

Examples

n[-100, 100)

Description — any number greater than or equal to –100 and less than 100

Valid input examples

-100

-99.9

99.9999

Invalid input examples

-100.1

too small, must be greater than –100

100

too large, must be less than 100

 

#[min, max] — used to specify a value that is greater than or equal to min and less than or equal to max.

Examples

n[-100, 100]

Description — any integer number greater than or equal to –100 and less than or equal to 100

Valid input examples

-100

0

100

Invalid input examples

-100.1

too small, must be greater than –100

100.001

too large, must be less than or equal to 100

 

i[100, *)

Description — any integer number greater than or equal to 100

Valid input examples

100

1000

Invalid input examples

99

too small, must be greater than or equal to 100

100.5

integer values cannot have a decimal point

 

i(-1.0, +1.0)

Description — this is an invalid input format because the min and max are not integer values as the “i” specifies.

n(+1.0, -1.0)

Description — this is an invalid input format because max is less than min.

See also:

Input formats