File r37/lisp/csl/html/r37_0121.html artifact 4c08cfbb77 part of check-in 237b3683c0



<A NAME=PRIMEP>

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



<B>PRIMEP</B> _ _ _  _ _ _  _ _ _  _ _ _ <B>operator</B><P>
<P>
 
 <P>
<P>
 <P> <H3> 
syntax: </H3>
<em>primep</em>(&lt;expression&gt;) or <em>primep</em> &lt;simple\_expression
&gt; 
<P>
<P>
<P>
If &lt;expression&gt; evaluates to a integer, <em>primep</em> returns 

<A HREF=r37_0122.html>true</A> <P>
<P>
if &lt;expression&gt; is a prime number and 
<A HREF=r37_0014.html>nil</A> otherwise. 
If &lt;expression&gt; does not have an integer value, a type error occurs. 
<P>
<P>
 <P> <H3> 
examples: </H3>
<P><PRE><TT>
if primep 3 then write &quot;yes&quot; else write &quot;no&quot;; 


  YES 


if primep a then 1; 

  ***** A invalid as integer

</TT></PRE><P>

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