The definition of the EDIT command is done in a different way. Since EDIT is used within ICL to edit procedures, if we just used DEFSTRING to define EDIT as $ EDIT we would lose the ability to edit ICL procedures. The EDIT command would always edit VMS files.
The procedure used to redefine EDIT gets round this by testing for the existence of a dot in the name to be edited using the INDEX function. If a dot is present it assumes that a VMS file is being edited and issues the command $ EDIT (name). If no dot is present it is assumed that an ICL procedure is being edited, and the command #EDIT (name) is issued. The # character forces the internal definition of EDIT to be used, rather than the definition currently being defined.
The procedure is written as a hidden procedure, indicated by the word
HIDDEN preceding PROC. A hidden procedure works in exactly the same way
as a normal procedure, but it does not appear in the listing of procedures
produced by a PROCS statement, nor can it be edited, deleted or saved. It
is convenient to make all procedures in your login file hidden procedures
so that they do not clutter your directory of procedures, and cannot be
accidentally deleted.
ICL The Interactive Command Language for ADAM