home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pmos2002.zip / DEF / REALIO.DEF < prev    next >
Text File  |  1992-10-10  |  2KB  |  47 lines

  1. DEFINITION MODULE RealIO;
  2.  
  3.     (********************************************************)
  4.     (*                            *)
  5.     (*        Real I/O using windows.            *)
  6.     (*                            *)
  7.     (*  Programmer:        P. Moylan            *)
  8.     (*  Last edited:    10 October 1992            *)
  9.     (*  Status:        Working                *)
  10.     (*                            *)
  11.     (*    NOTE: several procedures which used to be    *)
  12.     (*    in this module have now been moved to        *)
  13.     (*    module Conversions.                *)
  14.     (*                            *)
  15.     (********************************************************)
  16.  
  17. FROM Windows IMPORT
  18.     (* type *)    Window;
  19.  
  20. PROCEDURE WriteReal (w: Window;  number: REAL;  places: CARDINAL);
  21. PROCEDURE WriteLongReal (w: Window;  number: LONGREAL;  places: CARDINAL);
  22.  
  23.     (* Writes the second argument as a decimal number, right-justified    *)
  24.     (* in a field of "places" places.                    *)
  25.  
  26. PROCEDURE ReadReal (w: Window): REAL;
  27. PROCEDURE ReadLongReal (w: Window): LONGREAL;
  28.  
  29.     (* Reads and converts a numeric string from the keyboard.    *)
  30.  
  31. PROCEDURE ReadBufferedReal (w: Window;  fieldsize: CARDINAL): REAL;
  32. PROCEDURE ReadBufferedLongReal (w: Window;  fieldsize: CARDINAL): LONGREAL;
  33.  
  34.     (* Like ReadReal, but allows the user to edit within a field of    *)
  35.     (* the specified size.                        *)
  36.  
  37. PROCEDURE EditReal (w: Window;  VAR (*INOUT*) variable: REAL;
  38.                             width: CARDINAL);
  39. PROCEDURE EditLongReal (w: Window;  VAR (*INOUT*) variable: LONGREAL;
  40.                             width: CARDINAL);
  41.  
  42.     (* Displays the current value of "variable" at the current cursor    *)
  43.     (* position in window w, using a field width of "width" characters,    *)
  44.     (* and gives the user the option of altering the value.        *)
  45.  
  46. END RealIO.
  47.