FUNCTION validate_attribute_id

(* SCHEMA step_merged_ap_schema; *)
-- IN AP242
FUNCTION validate_attribute_id
      (attid : attribute_identifier ) : BOOLEAN;
   CONSTANT
      letters : SET [52:52] OF STRING := [ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' ];
      numbers_etc : SET [15:15] OF STRING := [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '_', '[', ']', '.', '\' ];
      valid_chars : SET [67:67] OF STRING := letters + numbers_etc;
   END_CONSTANT;
   LOCAL
      id_length : INTEGER := LENGTH(attid);
      id_valid : BOOLEAN := TRUE;
      i : INTEGER;
   END_LOCAL;
      IF NOT (attid[1] IN letters) THEN
         id_valid := FALSE;
      END_IF;
      REPEAT i := 2 TO id_length WHILE id_valid = TRUE;
         IF NOT (attid[i] IN valid_chars) THEN
            id_valid := FALSE;
         END_IF;
      END_REPEAT;
      RETURN (id_valid);
END_FUNCTION;

Referenced By

Defintion validate_attribute_id is references by the following definitions:
DefinitionType
 attribute_identifier STRING


[Top Level Definitions] [Exit]

Generated by STEP Tools® EXPRESS to HTML Converter
2024-09-06T14:00:33-04:00