Enscribe Programmer's Guide
next := false;
REVERSE := reverse;
FILE_SETPOSITION_, POSITION:
CKV := rip := record specifier;
CKS := primary
if format I file format then CMPL := CKL := 4
else CMPL := CKL := 8;
MODE := approx;
next := false;
REVERSE := false;
READ:
position := if next then find^next (MODE, CKS, CKV, CMPL,
REVERSE)
else find (MODE, CKS, CKV, CMPL, REVERSE);
if error then return;
record := file[position];
CKV := rip := keyfield (record, CKS);
CKL := keylength (record, CKS);
next := true;
READUPDATE:
position := find (exact, CKS, CKV, CKL, REVERSE);
if error = 1 then error := 11; if error then return;
record := file[position];
WRITEUPDATE:
position := find (exact, CKS, CKV, CKL, REVERSE);
if error = 1 then error := 11; if error then return;
if write count = 0 then
if entryseq then begin error := 21; return; end;
else delete the record
else file[position] := record;
WRITE:
if keyseq then
begin
position := insert (keyfield (record, primary),
keylength (record, primary));
if error then return;
file[keyposition] := record;
end;
if relative then
begin
if CKS then begin error := 46; return; end;
if rip <> -2 and rip <> -1 and next then rip := rip +1;
position := insert (rip, 4);
if error then return;
file[position] := record;
CKV := keyfield (record, primary);
next := true;
end;
if entryseq then
begin
if CKS then begin error := 46; return; end;
position := insert (-1,4); ! end-of-file
file[position] := record;
CKV := keyfield (record, primary);
182 Action of Current Key, Key Specifier, and Key Length