Navigation
Synopsis returns the dynamic type of a value as a reified type
Function Symbol typeOf(value v)
Usage import Type;
Description As opposed to the # operator, which produces the type of a value statically, this function produces the dynamic type of a value, represented by a symbol.
Examples
rascal>import Type;
ok
rascal>value x = 1;
value: 1
rascal>typeOf(x)
Symbol: int()
Pitfalls
  • Note that the typeOf function does not produce definitions, like the unknown: Rascal:Reify operator does, since values may escape the scope in which they've been constructed leaving their contents possibly undefined.
[Edit] | [New Subconcept] | [Recompile Course] | [Warnings] 1 warning in this concept
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.