home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / modula2 / library / queuem2 / getrange.def < prev    next >
Text File  |  1989-08-02  |  2KB  |  55 lines

  1. (* source: h:\modula\defs\GetRange.MOD     v1.0a            revised: 88.06.20
  2.    author: G.Greene, AGCS D/429 (NS/TS), 312/681-7783       created: 88.06.20
  3.  
  4.    function:
  5.     This is the interface definition for a module which exports procedures
  6.     which interact with the operator, prompting for numeric values which
  7.     must be constrained to specified ranges.
  8.  
  9.    history:
  10.     88.06.20  1.0a  initial release.
  11. *)
  12.  
  13.  
  14. DEFINITION MODULE  GetRange;
  15.  
  16.  
  17. (* Return as the function value a CARDINAL within the range specified by
  18.    the first and second parameters.  The value to be returned is requested
  19.    interactively of the program's operator, using the prompt string specified
  20.    by the third parameter, and a display of the acceptable value limits.
  21. *)
  22.  
  23. PROCEDURE  GetLimitedCARDINAL (
  24.                        (*in*)  LowerLimit,
  25.                        (*in*)  UpperLimit:   CARDINAL;
  26.                        (*in*)  PromptString: ARRAY  OF CHAR ): CARDINAL;
  27.  
  28.  
  29.  
  30. (* Return as the function value an INTEGER within the range specified by
  31.    the first and second parameters.  The value to be returned is requested
  32.    interactively of the program's operator, using the prompt string specified
  33.    by the third parameter, and a display of the acceptable value limits.
  34. *)
  35.  
  36. PROCEDURE  GetLimitedINTEGER (
  37.                       (*in*)  LowerLimit,
  38.                       (*in*)  UpperLimit:   INTEGER;
  39.                       (*in*)  PromptString: ARRAY  OF CHAR ): INTEGER;
  40.  
  41.  
  42.  
  43. (* Return as the function value a positive REAL.  The value to be returned is
  44.    requested interactively of the program's operator, using the prompt string
  45.    specified by the first parameter.  The second parameter indicates whether
  46.    zero is an acceptable value:  if is is FALSE, the value must be "strictly
  47.    positive" (i.e., non-zero).
  48. *)
  49.  
  50. PROCEDURE  GetPositiveREAL (
  51.                     (*in*)  PromptString: ARRAY  OF CHAR;
  52.                     (*in*)  ZeroAllowed:  BOOLEAN ): REAL;
  53.  
  54. END  GetRange.
  55.