Xbasic

DIM...AS...DEFAULT

Syntax

DIM variable_name AS type = DEFAULT value

Arguments

variable_name

The name of the variable to dimension.

type

The data type.

value

The new default value

Description

Way to override the default assignment. If you say DIM num as N = default 2 it will set your default value to 2.

If you try to set a dim as default value twice, the initial value that you set will be the one that Xbasic uses.

Example

DIM num AS N = DEFAULT 2
DIM current AS D = DEFAULT now()
DIM person AS P = DEFAULT null_value()

See Also