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
convert/local - convert an expression to a local name
Calling Sequence
convert(e, '`local`')
Parameters
e
-
expression; name, string, or symbol
Description
An expression e (typically itself a symbol or string) can be converted to a local name using the convert( e, '`local`' ) calling sequence. The expression returned is of type symbol, and is guaranteed to be unequal to any name at the same scope in which the call is made. If the expression e is a symbol, then the symbol returned by this conversion has the same external representation as e, but is distinct from e. (See the examples.)
Note that, because it is a Maple keyword, the name local must be enclosed in left single quotes, as demonstrated by the examples below.
Examples
p := proc() local t; evalb( t = convert( t, '`local`' ) ) end proc;
Even when called on the same argument within the same scope, distinct calls yield distinct names.
q := proc() local t; evalb( convert( t, '`local`' ) = convert( t, '`local`' ) ) end proc:
This is also true for module scopes.
m := module() export e, try1, try2; local t; try1 := proc() evalb( e = convert( e, '`local`' ) ) end proc; try2 := proc() evalb( t = convert( t, '`local`' ) ) end proc; end module:
This facility can be used to generate a collection of distinct objects all of which look the same.
See Also
convert, keyword, name, procedure, type/name, type/symbol
Download Help Document