Overview Schemas Index

SUPPORT_RESOURCE_SCHEMA (jsdai.SSupport_resource_schema)


FUNCTION type_check_function
          (the_type : GENERIC, sub_names : SET [0:?] OF STRING, criterion : INTEGER) : LOGICAL;

IF ((NOT EXISTS(the_type)) OR  (NOT ({0 <= criterion <= 3})) OR (SIZEOF(sub_names) = 0)) THEN
      RETURN  (UNKNOWN);
    ELSE
      CASE criterion OF 
        0:
          RETURN  (SIZEOF(sub_names * TYPEOF(the_type)) > 0);
        1:
          RETURN  (SIZEOF(sub_names * TYPEOF(the_type)) = 0);
        2:
          RETURN  (SIZEOF(sub_names * TYPEOF(the_type)) = 1);
        3:
          RETURN (SIZEOF(sub_names * TYPEOF(the_type)) <= 1);
      END_CASE;
    END_IF;

END_FUNCTION; -- type_check_function

public class FType_check_function
          public static Value run(SdaiContext _context, Value the_type, Value sub_names, Value criterion)