find-registry - Index search of a registry sub-tree.
find-registry "root" "subkey" index
find-registry performs an indexed search of a registry sub-tree allowing the caller to determine the names of the children that exist as sub-nodes of the specified node. root and sub-key form the root whose children are to be determined, subkey may be specified as the null-string ("") if an absolute registry path is specified. index is a value from 0..n and identifies the index number of the child node. The name of the child node is returned in $result(5) if one exists, otherwise an error status is returned.
The following example comes from addrbook.emf and shows how find-registry is used to iterate through entries in the address book. Note that find-registry is used with !force(4) and the $status(5) of the call is tested to determine if the invocation succeeded.
!force find-registry "/AddressBook" "Names" #l0 !if $status set-variable #l1 $result 76 insert-string "_" 2 newline insert-string &spr "Section: %s" #l1 newline ; Iterate through all of the entries. set-variable #l2 0 !repeat !force #l2 ab-buffer !if $status set-variable #l2 &add #l2 1 !endif !until ¬ $status set-variable #l0 &add #l0 1 !goto next !endif
(c) Copyright JASSPA 1999
Last Modified: 1998/08/05
Generated On: 1999/12/01