Name Values

The Name class defines the characteristics of names. Names are primarily used as parameters in function calls to signify one of a set of options.



See Names for a description of Name literals.


<string> as name

Converts a String value into a name


<name> == <name>

<name> != <name>

<name> < <name>

<name> > <name>

<name> <= <name>

<name> >= <name>

Comparison of names is caseless alphabetic. Among other things, this allows arrays of names to be sorted using the array sort function.


copy <name>

Creates a new copy of the name value.



The following script shows the use of various literals, constructors, and operators of the Name class.


-- name test bed

name1=#Hello -- set variable to name literal

name2="HELLO" as name -- convert string to name

if name1 == name2 do print "names are equal" -- compare the names

box_props=getpropnames box -- get the properties of box class

sort box_props -- sort the property names


#Hello -- result of line 2

#Hello -- result of line 3

"names are equal" -- output from line 4

"names are equal" -- result of line 4

-- following are the results of lines 5 and 6

#(#height, #length, #lengthsegs, #width, #widthsegs, #mapCoords, #heightsegs)

#(#height, #heightsegs, #length, #lengthsegs, #mapCoords, #width, #widthsegs)