typecheck - ensure that a value is derived from a specified Type
oadl::typecheck(val,typ)
The typecheck() intrinsic procedure checks to
see whether a value is derived from a given type. For scalar types,
this is a fairly trivial check. For array and object types, it is
more complicated. See documentation of oadl::is_a() for a detailed
description of how type derivation is determinted.
oadl::typecheck() always returns
true on success. On failure, a
TypeCheck exception is thrown.
TypeCheck when the value and type do not match
oadl::typecheck(String, "foobar")
true
oadl::typecheck(Array[*], "foobar")
true
oadl::typecheck(Array, "foobar")
Illegal type