DBRELATE.MOD 777 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. (*
  2. * ModBase
  3. * Release 3.0
  4. * (c) copyright 1990 PMI
  5. * P.O. Box 8402
  6. * Green Bay Wi 53308
  7. * All Rights Reserved
  8. *
  9. *)
  10. IMPLEMENTATION MODULE DBRelate;
  11. (* Copywright 1990-1991 John McMonagle
  12. ModBase 3.0 *)
  13. FROM ModBase3 IMPORT
  14. DBFile,ReadDBRec;
  15. FROM DBIndxes IMPORT
  16. DBIndex,FindPositionCh,FindPositionN,CurrentRec,NumKeyType;
  17. PROCEDURE ReadRelate(key:ARRAY OF CHAR; ndx:DBIndex;
  18. dbf:DBFile):BOOLEAN;
  19. VAR
  20. ok:BOOLEAN;
  21. BEGIN
  22. IF NumKeyType(ndx)
  23. THEN
  24. FindPositionN(ndx,key,ok);
  25. ELSE
  26. FindPositionCh(ndx,key,ok);
  27. END;
  28. IF NOT ok
  29. THEN
  30. RETURN FALSE;
  31. END;
  32. ReadDBRec(dbf,CurrentRec(ndx));
  33. (* assume if ReadDBREC fails program will terminate *)
  34. RETURN TRUE;
  35. END ReadRelate;
  36. END DBRelate.
  37.