PRIMEP INDEX

PRIMEP _ _ _ _ _ _ _ _ _ _ _ _ operator

syntax:

primep(<expression>) or primep <simple\_expression >

If <expression> evaluates to a integer, primep returns true

if <expression> is a prime number and nil otherwise. If <expression> does not have an integer value, a type error occurs.

examples:


if primep 3 then write "yes" else write "no"; 


  YES 


if primep a then 1; 

  ***** A invalid as integer