File r37/lisp/csl/html/r37_0220.html artifact e8545534f2 part of check-in e1a8550313



<A NAME=SHARE>

<TITLE>SHARE</TITLE></A>
<b><a href=r37_idx.html>INDEX</a></b><p><p>



<B>SHARE</B> _ _ _  _ _ _  _ _ _  _ _ _ <B>declaration</B><P>
<P>
 
The <em>share</em> declaration allows access to its arguments by both 
algebraic and symbolic modes. 
 <P> <H3> 
syntax: </H3>
<P>
<P>
<em>share</em>&lt;identifier&gt;{,&lt;identifier&gt;}* 
<P>
<P>
<P>
&lt;identifier&gt; can be any valid REDUCE identifier. 
<P>
<P>
Programming in 
<A HREF=r37_0221.html>symbolic</A> 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 <em>share</em> 
declaration is used. For more information on using symbolic mode, see 
the &lt;REDUCE User's Manual&gt;, and the &lt;Standard Lisp Report&gt;. 
<P>
<P>
You should be aware that a previously-declared array is destroyed by the 
<em>share</em> declaration. Scalar variables retain their values. You can 
share a declared 
<A HREF=r37_0345.html>matrix</A> 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 
<A HREF=r37_0343.html>MAT</A>, 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 
<A HREF=r37_0046.html>first</A>, 
<A HREF=r37_0063.html>second</A>, 
<A HREF=r37_0066.html>third</A> and 

<A HREF=r37_0057.html>rest</A>. 
<P>
<P>
<P>


REDUCE Historical
REDUCE Sourceforge Project | Historical SVN Repository | GitHub Mirror | SourceHut Mirror | NotABug Mirror | Chisel Mirror | Chisel RSS ]