[back] [prev] [next] [index] [root]

 


IsRecType

Returns true iff the argument is an record with an Type enry containing the correct string.

Syntax:

flag := IsRecType(a, type);

boolean
  flag  
anything
  a  
string
  type  

Description:

Useful in User-supplied functions, see the Abelian group package as an example.


Example:


kash> a := rec(Type := "Test", data := 1);
rec(
  Type := "Test",
  data := 1 )
kash> IsRecType(a, "Test");
true
kash> IsRecType(a, "Paul");
false
kash> IsRecType(2, "two");
> false


<- back[back] [prev] [next] [index] [root]