! ----- VALIDATE_IDENTIFIER.FUN ----- ! ! ----- FUNCTION TO VALIDATE AN IDENTIFIER (ON THE LOCAL NODE) ----- ! ! ---------- PASSED: ---------- ! ----- (VALIDATE_IDENTIFIER returns FALSE if the ! ----- identifier exists, otherwise returns true) ! ----- THE_IDENT = Identifier name to be validated ! ! ----- Last Change 07/06/93 by Brian Lomasky ----- ! FUNCTION WORD VALIDATE_IDENTIFIER %INCLUDE "NUSER.INC" EXTERNAL WORD FUNCTION SEARCH_RIGHTSLIST(WORD, WORD, & WORD) ! READ MATCHING RIGHTSLIST REC VALIDATE_IDENTIFIER = TRUE ! ASSUME ERROR STATUS IF DEBUG_MODE THEN PRINT "DEBUG>----- Call VALIDATE_IDENTIFIER" END IF ! ----- SEE IF THE_IDENT ALREADY EXISTS ----- ! ----- SEARCH FIRST RIGHTSLIST.DAT FILE BY ITS ALTERNATE ----- ! ----- KEY #2 TO CHECK FOR A VALID IDENTIFIER ----- KGB_NAME = THE_IDENT ! STORE IDENTIFIER TO SEARCH FOR ! ----- EXIT WITH ERROR STATUS IF THE IDENTIFIER ----- ! ----- DOES NOT EXIST ----- EXIT FUNCTION IF NOT SEARCH_RIGHTSLIST(1%, 2%, FALSE) VALIDATE_IDENTIFIER = FALSE ! RETURN SUCCESS STATUS END FUNCTION