**************************** INPT.BSI ************************************

INPT.BSI is an AlphaBASIC ++INCLUDE file that allows the user to perform
VUE-like editing functions on ordinary program input.  INPT also does
some entry-error-checking (like making sure that only digits and decimals
are entered for a numeric field, assuring that the entry is not too large
or small, etc.)

INPT was authored by Brad Horine of Hytek Amplifier Inc (Hytek Amplifier /
P.O. Box 670 / Joplin, MO 64802.)  All rights are reserved to the author.
Permission is granted to copy and use freely.  Any distribution of this
routine for commercial gain is strictly prohibited.

Copyright (C) 1986 by Brad Horine.  All rights reserved.

INPT.BSI was inspired by a similar routine included with the source code
of MAC Accounting (Management Analysis & Control / 3530 "C" St. N.E. /
Auburn, WA 98002) which performed many functions which are similar to
those of INPT.BSI (especially error-checking & validation.)  If fact,
MAC's routine is also named INPT, and many of the parameter variables
used by both routines are the same.  This was done to insure upwards
compatability between MACs routine and mine, and in no way should be
construed to mean that I am associated with MAC, or that this version
of INPT is supported by them.  This is a completely original work, and
any similarities between it and any other input routine are purely
coincidental, except as noted above.

INPT uses a subroutine called GET.SBR, which was authored by Dave Pallman
of UltraSoft (UltraSoft / 367 Wildwood Road / Ronkonkoma, NY 11779.)
I am in no way associated with UltraSoft, except that David and I do
correspond on occasion. The subroutine GET.SBR is in the public domain,
and is available from AMUS (AMUS / 735 Walnut / Boulder, CO 80302.)
INPT also makes use of STRIP.SBR, which is distributed with all current
versions of AMOSL as of Version 1.3.

Enough legal mumbo jumbo, on with the explanations.

************************** Using INPT.BSI ********************************

Load GET.SBR and STRIP.SBR into either system OR user memory with the
following commands:

       SYSTEM GET.SBR[7,6]     ; Include these in your
       SYSTEM STRIP.SBR[7,6]   ; AMOSL.INI file

                 - - - - - - OR - - - - - -

       LOAD BAS:GET            ; Execute these statements before
       LOAD BAS:STRIP          ; RUNning your application.


Include these statements near the beginning of your AlphaBASIC source
code:
       ++INCLUDE INPT.MAP
       ++INCLUDE INPT

****************** Minimum Parameters Required ***************************

Include these statements at the point where you want to allow input:
Note: These are the MINIMUM number of parameters to be specified.

(String Input)
       R$="S": R1=column to begin input : R2=row to begin input
       R3=max. length of input : CALL INPT
or
       R$="S,cc,rr,ll" where cc=column  rr=row  ll=length
        (cc, rr, and ll MUST be two characters in length)

       The input will be returned in R8$, padded with blanks.

(Numeric Input)
       R$="N": R1=column to begin input : R2=row to begin input
       R3=max. length of input : R3$=editing mask (ie "###.##")
       CALL INPT
or
       R$="N,cc,rr,ll" : R3$="###.##" where cc=column  rr=row  ll=length
        (cc, rr, and ll MUST be two characters in length)

       The number input will be returned in R8, and its formatted
       value in R8$.


***************** Additional Parameters Available ************************

(All input types)
       R6$=default value - if user just hits ENTER, this value will
        be returned.  If no default is specified, the default is
        a null string ("").  The default value is displayed on the
        input line for examination in low-intensity characters until
        the user enters data, at which time it disappears.  See also
        the explanation of ^Z below.

       R9=prompt column : R10=prompt row : R9$=input prompt
        The string R9$ will be printed at the sceen coordinates
        (R10,R9) as an input prompt.  If R9 or R10 are omitted,
        but R9$ is specified, it will be printed at (24,1).

(String Input)
       R4=no. of valid chars : R5$="list of valid chars"
        If input will be a 1-char string, the input routine will
        check to see that it is one of the characters in R5$.
        (R4 must contain the number of chars found in R5$.)

(Numeric Input)
Note:   Only the digits 0 through 9, a decimal point, a minus sign,
       and commas are allowed to be input into numeric fields.
       The trailing minus sign (###.##-) is supported in the
       editing mask (R3$,) but the sign must be in front of the
       digits in the user's input (-20.00, not 20.00-).  The number
       will, however, be reprinted to the screen in trailing-sign
       format if specified.  Commas are allowed in the user's input,
       but will only be returned to the calling program if the
       edit mask (R3$) specifies them (ie ####,.##).

       R5=minimum value allowed : R6=maximum value allowed
        The routine will check that the number input is not
        less than the minimum nor greater than the maximum.

************ Control Characters Recognized by INPT.BSI *******************

^A  Cursor backward to beginning of previous word
^B  - ignored -
^C  Interrupt as usual
^D  Delete character at cursor
^E  Cursor to end of line (same as ^N)
^F  Insert blank at cursor
^G  - ignored -
^H  (or LEFT ARROW) Cursor left; or "END" if 1st character entered
^I  (or TAB) Cursor to next word (same as ^W)
^J  (or DOWN ARROW) Fold character to lower case
^K  (or UP ARROW) Fold character to upper case
^L  (or RIGHT ARROW) Cursor right
^M  (or RETURN) Terminate input
^N  Cursor to end of line (same as ^E)
^O  Delete blanks from cursor to next non-blank character
^P  - ignored -
^Q  Toggle character-insert mode (similar to VUE, except DEL doesn't
      close up the gaps)
^R  Re-type the current line
^S  Swap this character with the following character
^T  - ingored -
^U  Cursor to beginning of line (same as ^^ or HOME)
^V  Delete to end of word
^W  Cursor forward to beginning of next word
^X  Accept displayed default value for editing purposes.  Can be used
     only as 1st character input, or after a ^Z
^Y  Erase from cursor to end of field
^Z  Ignore any previous input and re-display default value

ESC Force "END" to the return value (similar to ^H above, except always
     forces END from any position in line)
^^  (or HOME) Cursor to beginning of line (same as ^U)
DEL Backspace and delete character, as usual

-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*