Next: isnull() Up: MacAnova Help File Previous: ismissing()   Contents


isname(arg1 [, arg2, ... ] [file:T  or  path:T]), arg1, ... CHARACTER

Keywords: macros, general, variables
isname(arg) returns T if the value of arg is a legal MacAnova name.
Argument arg must be a CHARACTER scalar or be missing.  See topic
'variables' for information on what is a legal name.

isname(arg1, ..., argk), where the arguments are either CHARACTER
scalars or missing returns a LOGICAL vector of length k with element j
being True if and only if argument k is a CHARACTER scalar whose value
is a legal MacAnova name.

isname(arg1, ..., path:T) does the same except the arguments are
checked as to whether they are appropriate file names or folder
(directory) names on the computer being used.

isname(arg1, ..., file:T), does the same as with 'path:T' except that
False is returned for any argument that can be only a directory, that is
the name ends in a path name separator ('/' on Unix/Linux, Windows or
DOS , '\' on Windows or DOS, ':' on Macintosh).

The checking done with 'path:T' and 'file:T' may not exactly match the
formal definition of what is a legal file name.  For instance, on
Unix/Linux, isname("-myfile.txt") is False, although '-myfile' is a
legal Unix/Linux file name, because names starting with '-' can lead to

It is legal for an argument to be missing.  For example, a <- isname()
sets a to F and a <- isname("cos",,"sin") sets a to vector(T,F,T).

The principal use of isname() is in checking the arguments of a macro
for appropriateness.

 isname("PI") returns True
 isname("123+4") returns False
 isname("x","@y",,"T","too_long_a_name") returns vector(T,T,F,F,F)
 isname("macanova.hlp","macros/",file:T) returns vector(T,F) on
   Unix/Linux, Windows and DOS
 isname("macanova.hlp","macros/",path:T) returns vector(T,T) on
   Unix/Linux, Windows and DOS
 isname("macanova.hlp",":macros:",file:T) returns vector(T,F) on a
 isname("macanova.hlp",":macros:",path:T) returns vector(T,T) on a

See also topics 'macros', isarray(), ischar(), isdefined(), isfactor(),
isfunction(), isgraph(), islogic(), ismacro(), ismatrix(), isnull(),
isnumber(), isreal(), isscalar(), isstruc(), isvector(), nameof().

Gary Oehlert 2003-01-15