(* source: h:\modula\defs\GetRange.MOD     v1.0a            revised: 88.06.20
   author: G.Greene, AGCS D/429 (NS/TS), 312/681-7783       created: 88.06.20

   function:
    This is the interface definition for a module which exports procedures
    which interact with the operator, prompting for numeric values which
    must be constrained to specified ranges.

   history:
    88.06.20  1.0a  initial release.
*)


DEFINITION MODULE  GetRange;


(* Return as the function value a CARDINAL within the range specified by
   the first and second parameters.  The value to be returned is requested
   interactively of the program's operator, using the prompt string specified
   by the third parameter, and a display of the acceptable value limits.
*)

PROCEDURE  GetLimitedCARDINAL (
                       (*in*)  LowerLimit,
                       (*in*)  UpperLimit:   CARDINAL;
                       (*in*)  PromptString: ARRAY  OF CHAR ): CARDINAL;



(* Return as the function value an INTEGER within the range specified by
   the first and second parameters.  The value to be returned is requested
   interactively of the program's operator, using the prompt string specified
   by the third parameter, and a display of the acceptable value limits.
*)

PROCEDURE  GetLimitedINTEGER (
                      (*in*)  LowerLimit,
                      (*in*)  UpperLimit:   INTEGER;
                      (*in*)  PromptString: ARRAY  OF CHAR ): INTEGER;



(* Return as the function value a positive REAL.  The value to be returned is
   requested interactively of the program's operator, using the prompt string
   specified by the first parameter.  The second parameter indicates whether
   zero is an acceptable value:  if is is FALSE, the value must be "strictly
   positive" (i.e., non-zero).
*)

PROCEDURE  GetPositiveREAL (
                    (*in*)  PromptString: ARRAY  OF CHAR;
                    (*in*)  ZeroAllowed:  BOOLEAN ): REAL;

END  GetRange.
