Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
StringTools[GenerateIdentifier] - create an identifier sequence generator
Calling Sequence
GenerateIdentifier( opts )
Parameters
opts
-
(optional) options
Description
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 as a base, and appending integer suffices until the length of the resulting string exceeds a specified maximum length.
The default maximum length is .
The maximum length can be changed by specifying the maxlen = LEN option, which takes a positive integer value LEN.
The default base string can be changed by specifying the base = STRING option.
In this case, the value of STRING will be used instead of .
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 option.
In this form, the returned generator forms strings by using maximal prefices of the given string, replacing suffices 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".
Examples
Error, (in StringTools:-GenerateIdentifier) base for identifiers is too long
Error, (in gen) no more identifiers
See Also
string, StringTools
Download Help Document