name



next up previous contents index
Next: indextype Up: Using mkobj() Previous: Using mkobj()

name

    In REDTEN the name of an indexed object is reserved: it stands for itself and cannot be assigned an algebraic value. The name carries a property list containing all the information needed to fully describe the object, including the index structure, symmetries, and component values. If the switch mkobjsafe is on and if name already has an algebraic value, dependencies, or is flagged used!* then mkobj() will warn that the name is in use and exit. This is intended to protect the user from accidentally supplying a name that might be part of an algebraic expression and which might lead to conflict between the uses of the name. The used!* flag (a REDUCE internal flag) is set whenever a name is typed to the algebraic parser (hence it also includes names with values or dependencies), thus it may be that this behaviour is somewhat restrictive. If the user immediately repeats the call to mkobj() with the same object name, the mkobjsafe switch is over-ridden and the object will be created.

In many cases an indexed object name can be used as a variable without serious difficulty, but problems, especially where dependencies are involved, can occur. If mkobjsafe is off, and if <name> originally had an algebraic value, that value is lost, and in fact, any values or properties associated with <name> are removed when it is made into an indexed object. The only other time mkobj() will fail to create a new object is when name is that of a kill-protected indexed object (see 5.2), or has been flagged reserved. If the user is creating an object whose name is that of a generic object (qv), the generic object is removed and a warning message is printed. The name of the new object is stored in the list indexed!-names.

As noted above, it is best to apply the lisp quote-character ' to the object name. Any special characters in the name must also be quoted with the escape character !. Because the name has been quoted, it cannot be an expression or operator that evaluates to a name. The name argument to mkobj() can also be a quoted list of names, each of which will be created with the same index structure and symmetries.



next up previous contents index
Next: indextype Up: Using mkobj() Previous: Using mkobj()



John Harper
Wed Nov 16 13:34:23 EST 1994