SHARE INDEX

SHARE _ _ _ _ _ _ _ _ _ _ _ _ declaration

The share declaration allows access to its arguments by both algebraic and symbolic modes.

syntax:

share<identifier>{,<identifier>}*

<identifier> can be any valid REDUCE identifier.

Programming in symbolic as well as algebraic mode allows you a wider range of techniques than just algebraic mode alone. Expressions do not cross the boundary since they have different representations, unless the share declaration is used. For more information on using symbolic mode, see the <REDUCE User's Manual>, and the <Standard Lisp Report>.

You should be aware that a previously-declared array is destroyed by the share declaration. Scalar variables retain their values. You can share a declared matrix that has not yet been dimensioned so that it can be used by both modes. Values that are later put into the matrix are accessible from symbolic mode too, but not by the usual matrix reference mechanism. In symbolic mode, a matrix is stored as a list whose first element is MAT, and whose next elements are the rows of the matri x stored as lists of the individual elements. Access in symbolic mode is by the operators first, second, third and rest.