REALINOU.DEF 1.5 KB

1234567891011121314151617181920212223242526272829303132
  1. (***********************************************************************)
  2. (* *)
  3. (* Modula_2 Compiler RealInOut Library Module *)
  4. (* *)
  5. (* High level input and output procedures for *)
  6. (* REAL numbers. RealInOut will be redirected *)
  7. (* when InOut is redirected. *)
  8. (* *)
  9. (* *)
  10. (* original module : N. Wirth, PIM-2, 1982 *)
  11. (* modifications : *)
  12. (* *)
  13. (***********************************************************************)
  14. DEFINITION MODULE RealInOut;
  15. IMPORT InOut;
  16. VAR
  17. Done : BOOLEAN ;
  18. PROCEDURE ReadReal(VAR x : REAL);
  19. (* Precondition : TRUE
  20. Postcondition : Done = TRUE if and only if the next sequence
  21. of characters represents a REAL value. *)
  22. PROCEDURE WriteReal(x : REAL; width :CARDINAL);
  23. (* Precondition : x and width are defined.
  24. Postcondition : Outputs a REAL value occupying at least width character
  25. positions. Leading blanks fill out the space if is not
  26. all required. *)
  27. END RealInOut.