create an identifier sequence generator
GenerateIdentifier( opts )
The GenerateIdentifier command returns a procedure that, when invoked repeatedly, returns strings for use as identifiers.
Identifiers are, by default, formed by using the string t as a base, and appending integer suffices until the length of the resulting string exceeds a specified maximum length.
The default maximum length is 6.
The maximum length can be changed by specifying the maxlen = LEN option, which takes a positive integer value LEN.
The default base string t can be changed by specifying the base = STRING option. In this case, the value of STRING will be used instead of t.
The value of the base string must not exceed the maximum identifier length.
An alternative system of generating names can be invoked by using the usename = STRING option. In this form, the returned generator forms strings by using maximal prefixes of the given string, replacing suffixes up to the maximum identifier length with digit sequences on subsequent calls.
The maximal prefix of the STRING used is shortened as long as at least one character from the string remains.
When no more unique strings not exceeding the maximum length can be generated, the returned generator raises the exception "no more identifiers".
A third option for generating identifiers can be invoked by using the usename = alphabet option. In this case, identifiers of the form a, b, ..., z, aa, ab, etc., are generated, up to the maximum identifier length.
All of the StringTools package commands treat strings as (null-terminated) sequences of 8-bit (ASCII) characters. Thus, there is no support for multibyte character encodings, such as unicode encodings.
Error, (in StringTools:-GenerateIdentifier) base for identifiers is too long
Error, (in gen) no more identifiers
The StringTools[GenerateIdentifier] command was updated in Maple 2017.
The usename option was updated in Maple 2017.
Download Help Document
What kind of issue would you like to report? (Optional)