[ library(var_name) | Reference Manual | Alphabetic Index ]

set_var_name_counter(++BaseName, ++Start)

Set the initial value for the counter for variable name BaseName.
A valid base-name (atom or string)
Start value for counter (integer)


Set the initial counter value for a variable name BaseName that will then be used in set_var_name/2, with Start as the initial value of the counter. If BaseName already exists (i.e. variables have already been named using BaseName), the predicate will fail.

It is expected that the main use of this predicate will be to change the default counter start value from 0 to 1. However, no restrictions are placed on what the start value may be.

Fail Conditions

BaseName already exists.




(5) type error
BaseName is not an atom or string.
(5) type error
Start is not an integer.
(6) out of range
BaseName does not begin with a capital letter.

See Also

set_var_name / 2