home *** CD-ROM | disk | FTP | other *** search
- Accept At routines for QuickBASIC
-
- These subprograms allow convenient display of prompts at specified row and
- column positions and subsequent acceptance of data limited by field length and a
- list of valid characters.
-
- The programs enclosed in this archive file run under Microsoft's QuickBasic
- version 3.0. The source code is provided so that the user can compile them for
- use in either the 8086 or 8087 environment.
-
- The programs also use ADVBAS version 3.4. This set of assembly language support
- routines is available in the GEnie library. When loading QuickBASIC, reference
- the ADVBAS library by using the statement QB /l ADVBAS.EXE or QB87 /l
- ADVBAS.EXE.
-
- ACPTDEMO.BAS - This program illustrates use of the subprograms which comprise
- the accept at routines. Load, compile, and execute it to get an idea of what
- the subprograms do. The program is internally documented.
-
- CALL PROMPT (r%, c%, P$, R$, nChars%, ptype%, rtype%, sc%) This subprogram
- displays a prompt on the screen at row r% and column c%. The prompt is passed
- in P$. Immediately following the prompt, the previous response for the entry
- (if any) is passed in R$. nChars% is the maximum field length allowed for the
- response. The screen attribute for the prompt and for the response field can be
- controlled separately in ptype% and rtype%, respectively. The program was
- written for a monochrome monitor with 1 = normal white on black, 2 = high
- intensity white on black, and 3 = reverse video. If you have a color monitor,
- you can change these attributes as desired in the CALL P() subprogram. The
- character CHR$(sc%) will be used to fill any unused space at the end of the
- response field. The value of c% is adjusted by the to point to the starting
- location of the response field.
-
- CALL P(T$, r%, c%, type%) - Prints the text string T$ at row r% and column c%
- using attribute 1, 2, or 3. These attributes are calculated using the ADVBAS
- CALCATTR subprobram for normal, high intensity, and reverse video with a
- monochrome monitor. If you are using a color monitor, you may wish to change
- the CALL CALCATTR statements in this subprogram. Display to the screen is done
- be writing directly to screen memory using ADVBAS CALL XQPRINTD.
-
- CALL INPT(r%, c%, rtype%, nChars%, valid$, sc%) - Allows the user to write data
- on the screen in the field starting at row r% and column c% and extending for
- nChars% characters. The screen attribute to be used is rtype%. The user can
- enter any characters contained in the list valid$. CHR$(sc%) will be used to
- fill any unused spaces at the end of the field. The following keys are active:
- Ins, Del, Back Space, Esc, the left and right arrows, and Enter. Ins toggels
- insert mode. Insert mode is indicated by a fat cursor in the center of the
- character. Normal mode is indicated by a thin cursor at the bottom of the
- character. Del deletes one character and fills the vacated right side of the
- field with a CHR$(sc%). Esc will restore the entry which was in the field at
- the time INPT was called. Back Space moves the cursor one position to the left
- and removing characters as it goes. The left and right arrows move the cursor
- without affecting the text. Enter is used to accept an entry and return to the
- calling program.
-
- CALL GETDATA(r%, c%, nChars%, R$, sc%) - This subprogram gets a string from the
- screen starting at row r% and column c% and extending for nChars% characters.
- Any spaces on the left or right of the returned string R$ are removed along with
- control characters and trailing CHR$(sc%)'s.
-
- The ACCEPTAT.BAS, INPUT.BAS, P.BAS, GETDATA.BAS, and PROMPT.BAS files are public
- domain and may be used in any way without restriction. ADVBAS 3.4 is
- copyrighted and subject to the restrictions specified by the author.
-
- Address any comments or criticisms to J.CLULOW GEnie E-Mail.