Next: , Previous: , Up: Internal Routines   [Contents][Index]

15.5.129 default

default, var1, value1 [, var2, value2 ] …

Assigns values value1, value2 … to variables var1, var2 …, but only for those value1 etcetera that are undefined. value1 etcetera may refer to possibly undefined earlier var1: the values to be assigned are only evaluated just before they are to be assigned to the variables. For instance, default,a,5,b,2*a works fine even if both a and b are undefined beforehand. In this case, a gets the value 5 and then b gets the value 10.

See also: defined, delete