anames - Maple Programming Help

anames

sequence of assigned names

 Calling Sequence anames( ); anames( type ); anames( 'environment' ); anames( 'user' ); anames( 'alluser' ); anames( 'active' );

Parameters

 type - expression

Description

 • The anames command returns an expression sequence of names that are currently assigned values other than their own name.
 • Only top-level global names are returned.  This excludes module exports and local variables.  The name of a global module itself will be included in the anames list, and can be used to find child members.
 • When anames is called with a type, anames returns an expression sequence of names that are currently assigned values of the given type.
 • When called with the argument environment, anames returns an expression sequence of environment variables in the active environment.
 • When called with the argument user, anames returns an expression sequence of user-assigned names.  A user-assigned name is defined as a name that is not saved in a library, and does not contain a forward-slash ('/') or leading underscore ('_').
 • When called with the argument alluser, anames returns the same output as anames(user) without filtering names containing a forward-slash ('/') or leading underscore ('_').
 • When called with the argument active, anames returns all the global names that have been assigned to in the current session.

 • The anames command is thread-safe as of Maple 15.

Examples

 > a := 1/2;
 ${a}{≔}\frac{{1}}{{2}}$ (1)
 > anames();
 ${\mathrm{defaultScreenWidth}}{,}{\mathrm{_libraryversion}}{,}{\mathrm{simplify/nosize}}{,}{\mathrm{type/local}}{,}{\mathrm{cosh}}{,}{\mathrm{solve}}{,}{\mathrm{PackageManagement}}{,}{\mathrm{sech}}{,}{\mathrm{getenv}}{,}{\mathrm{tanh}}{,}{\mathrm{arccsc}}{,}{\mathrm{convert/string}}{,}{\mathrm{arccsch}}{,}{\mathrm{ExternalCalling}}{,}{\mathrm{TypeTools}}{,}{\mathrm{sec}}{,}{\mathrm{march}}{,}{\mathrm{infolevel}}{,}{\mathrm{convert/list}}{,}{\mathrm{Typesetting}}{,}{\mathrm{arcsin}}{,}{\mathrm{D}}{,}{\mathrm{type/PhysicsVectors}}{,}{\mathrm{arcsec}}{,}{\mathrm{arccosh}}{,}{\mathrm{Physics/UserSetup}}{,}{\mathrm{vector}}{,}{\mathrm{isdir}}{,}{\mathrm{matrix}}{,}{\mathrm{fremove}}{,}{\mathrm{arcsinh}}{,}{\mathrm{RandomTools}}{,}{\mathrm{LibraryTools}}{,}{\mathrm{interface}}{,}{\mathrm{debugger/no_output}}{,}{\mathrm{DifferentialGeometry}}{,}{\mathrm{LinearAlgebra}}{,}{\mathrm{zip}}{,}{\mathrm{filepos}}{,}{\mathrm{Physics/ModuleIsLoaded}}{,}{a}{,}{\mathrm{packages}}{,}{\mathrm{SolveTools}}{,}{\mathrm{ListTools}}{,}{\mathrm{coth}}{,}{\mathrm{subtype}}{,}{\mathrm{copy}}{,}{\mathrm{version}}{,}{\mathrm{StringTools}}{,}{\mathrm{unprotect}}{,}{\mathrm{dsolve}}{,}{\mathrm{index}}{,}{\mathrm{arctanh}}{,}{\mathrm{protect}}{,}{\mathrm{csc}}{,}{\mathrm{ArrayTools}}{,}{\mathrm{-}}{,}{\mathrm{sinh}}{,}{\mathrm{sprintf}}{,}{\mathrm{tools/gensym}}{,}{\mathrm{/}}{,}{\mathrm{rtable_dims}}{,}{\mathrm{arctan}}{,}{\mathrm{cos}}{,}{\mathrm{FileTools}}{,}{\mathrm{arcsech}}{,}{\mathrm{arccot}}{,}{\mathrm{tan}}{,}{\mathrm{.}}{,}{\mathrm{pdsolve}}{,}{\mathrm{arccos}}{,}{\mathrm{csch}}{,}{\mathrm{arccoth}}{,}{\mathrm{cot}}{,}{\mathrm{sin}}{,}{\mathrm{Physics}}{,}{\mathrm{is}}$ (2)
 > anames(integer);
 ${\mathrm{defaultScreenWidth}}{,}{\mathrm{_libraryversion}}{,}{\mathrm{Order}}{,}{\mathrm{Digits}}{,}{\mathrm{printlevel}}$ (3)
 > anames(environment);
 ${%}{,}{\mathrm{%%}}{,}{\mathrm{%%%}}{,}{\mathrm{Digits}}{,}{\mathrm{Order}}{,}{\mathrm{_ans}}{,}{\mathrm{mod}}{,}{\mathrm{Normalizer}}{,}{\mathrm{Rounding}}{,}{\mathrm{Testzero}}{,}{\mathrm{index/newtable}}{,}{\mathrm{printlevel}}{,}{\mathrm{NumericEventHandlers}}{,}{\mathrm{UseHardwareFloats}}{,}{\mathrm{_Env_Plot_StandardInterface}}$ (4)
 > anames(user);
 ${\mathrm{defaultScreenWidth}}{,}{a}$ (5)

To find assigned names with a common prefix.

 > test1 := 1: test2 := 2: test3 := 3.2: testall := 3.2:
 > select(type,{anames()},suffixed(test));
 $\left\{{\mathrm{test1}}{,}{\mathrm{test2}}{,}{\mathrm{test3}}{,}{\mathrm{testall}}\right\}$ (6)
 > select(type,{anames()},suffixed(test,posint));
 $\left\{{\mathrm{test1}}{,}{\mathrm{test2}}{,}{\mathrm{test3}}\right\}$ (7)
 > select(type,{anames(integer)},suffixed(test,posint));
 $\left\{{\mathrm{test1}}{,}{\mathrm{test2}}\right\}$ (8)