File r37/lisp/csl/html/r37_0023.html artifact aa32ee006e part of check-in 3c4d7b69af



<A NAME=dot>

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



<B>.</B> _ _ _ <B>DOT</B> _ _ _  _ _ _  _ _ _  _ _ _ <B>operator</B><P>
<P>
 
 <P>
<P>
The . (dot) infix binary operator adds a new item to the beginning of an 
existing 
<A HREF=r37_0302.html>list</A>. In high energy physics expressions, 
it can also be used 
to represent the scalar product of two Lorentz four-vectors. 
<P>
<P>
 <P> <H3> 
syntax: </H3>
&lt;item&gt; <em>.</em> &lt;list&gt; 
<P>
<P>
<P>
&lt;item&gt; can be any REDUCE scalar expression, including a list; 
&lt;list&gt; must be a 
<A HREF=r37_0302.html>list</A> to avoid producing an error message. 
The dot operator is right associative. 
<P>
<P>
 <P> <H3> 
examples: </H3>
<P><PRE><TT>

liss := a . {}; 

  LISS := {A} 


liss := b . liss; 

  LISS := {B,A} 


newliss := liss . liss; 

  NEWLISS := {{B,A},B,A} 


firstlis := a . b . {c}; 

  FIRSTLIS := {A,B,C} 


secondlis := x . y . {z}; 

  SECONDLIS := {X,Y,Z} 


for i := 1:3 sum part(firstlis,i)*part(secondlis,i);
 


  A*X + B*Y + C*Z

</TT></PRE><P>

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