UD - Unsave Document

(05/10/13)

PURPOSE

Unsaves a set of registers from a document file. If there are multiple lines with the same key unsaves the last such line.   Example.

SEE ALSO

UD E [Unsave Document - End]
UD N [Unsave Document - get key Numbers from file]
UD S [Unsave Document - Sequential search]
UD IC [Unsave Document - In-core, Retrieve register values]

USAGE

.OPERATION: UD [k], [val1],[val2],[val3]
  <or>
UD 15, [val]
  <or>
UD -1,[valc]

.DOCUMENT FILE: DOC001
[Enter the name of the file where the registers are to be found. The first variable after 'UD' is used as a key for retrieving the desired register set stored in the document file. In the above example, let us assume [k] has the value: 4. The document file is searched for the last (or, in the case of 'UD S', next) entry under this key number. If this entry consisted of the line:
4 3 -1.5 30.8 0.0
then the values -1.5, 30.8, and 0.0 are put into the register variables [val1],[val2],[val3], respectively.]

'
If more register variables are specified on the operation line than exist in the document file line, an error message is printed out. In the above example,
UD [k],[val1],[val2],[val3],[val4]
would produce an error statement because the number of registers exceeds the three registers present for that key.]

NOTES

  1. Sequential search 'UD S' is much faster than non-sequential, and should be used whenever it is certain that no updates have occurred.

  2. If the specified key is -999 < key < 0 then the operation searches the document file for a line preceeded by a semicolon similar to a comment. This line is treated as as a regular line containing a special key and list of registers. This allows the retrieval of a limited set of values like rotation angles which are somehow associated with all the contents of the document file. The normal retrieval process (positive keys) treats these lines like comments.

  3. The document file is left open until closed with 'UD E' or until another document file is used with 'UD'. This saves time when there are multiple accesses.

SUBROUTINES

UDOC, OPENDOC, UNSAV, LUNDOC

CALLER

DRIV3