I was told, it's illegal to use data structure information, which doesn't were changed in the last 25 years (and after this many years, one could think to have the right given by "customary law" to use it), hence I decided for a more "legal" solution for the above problem - although this solution will work for IRIS (and recent Cache systems) only:
Class DC.Test Extends %RegisteredObject
{
/// Return TRUE if val contains a string
ClassMethod IsString2(val) As %Boolean
{
quit {"a":(val)}.%GetTypeOf("a")="string"
}
/// Return TRUE if val contains a number (int, real or double)
ClassMethod IsNumber2(val) As %Boolean
{
quit {"a":(val)}.%GetTypeOf("a")="number"
}
}- Log in to post comments