name

name x -- convert x to a string

It converts an expression x to a string which contains a visible representation of x, unless x is already a string, in which case it escapes the control characters within the string and encloses it in quotation marks. The value of name x is used when printing out x. If x is an hash table and x.name has a value, this value is returned. But if the value of x.name is a string or net, then it is returned. If x.name has no value and (class x)#name has a value, it is assumed to be a function and is applied to x in order to produce the name. Otherwise, the name provided is a suitable visible representation of the expression.

If x is a symbol, then the string "quote x" is returned unless the value of x is x itself.

x.name = "x" -- sets the name of x to "x".

See also describe.


topindexpreviousupnext