home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / BASIC / ACCEPT.ZIP / ACCEPTAT.DOC next >
Encoding:
Text File  |  1988-07-15  |  4.0 KB  |  65 lines

  1.                        Accept At routines for QuickBASIC
  2.  
  3. These subprograms allow convenient display  of  prompts  at  specified  row  and
  4. column positions and subsequent acceptance of data limited by field length and a
  5. list of valid characters.
  6.  
  7. The programs enclosed in this archive  file  run  under  Microsoft's  QuickBasic
  8. version  3.0.  The source code is provided so that the user can compile them for
  9. use in either the 8086 or 8087 environment.
  10.  
  11. The programs also use ADVBAS version 3.4.  This set of assembly language support
  12. routines  is available in the GEnie library.  When loading QuickBASIC, reference
  13. the ADVBAS  library  by  using  the  statement  QB  /l  ADVBAS.EXE  or  QB87  /l
  14. ADVBAS.EXE.
  15.  
  16. ACPTDEMO.BAS - This program illustrates use of the  subprograms  which  comprise
  17. the  accept  at  routines.  Load, compile, and execute it to get an idea of what
  18. the subprograms do.  The program is internally documented.
  19.  
  20. CALL PROMPT (r%, c%, P$, R$,  nChars%,  ptype%,  rtype%,  sc%)  This  subprogram
  21. displays  a  prompt on the screen at row r% and column c%.  The prompt is passed
  22. in P$.  Immediately following the prompt, the previous response  for  the  entry
  23. (if  any)  is  passed in R$. nChars% is the maximum field length allowed for the
  24. response.  The screen attribute for the prompt and for the response field can be
  25. controlled  separately  in  ptype%  and  rtype%,  respectively.  The program was
  26. written for a monochrome monitor with 1 =  normal  white  on  black,  2  =  high
  27. intensity  white  on black, and 3 = reverse video.  If you have a color monitor,
  28. you can change these attributes as desired in the  CALL  P()  subprogram.    The
  29. character  CHR$(sc%)  will  be  used  to fill any unused space at the end of the
  30. response field.  The value of c% is adjusted by the to  point  to  the  starting
  31. location of the response field.
  32.  
  33. CALL P(T$, r%, c%, type%) - Prints the text string T$ at row r%  and  column  c%
  34. using  attribute  1,  2, or 3.  These attributes are calculated using the ADVBAS
  35. CALCATTR subprobram for  normal,  high  intensity,  and  reverse  video  with  a
  36. monochrome  monitor.    If you are using a color monitor, you may wish to change
  37. the CALL CALCATTR statements in this subprogram.  Display to the screen is  done
  38. be writing directly to screen memory using ADVBAS CALL XQPRINTD.
  39.  
  40. CALL INPT(r%, c%, rtype%, nChars%, valid$, sc%) - Allows the user to write  data
  41. on  the  screen  in the field starting at row r% and column c% and extending for
  42. nChars% characters.  The screen attribute to be used is rtype%.   The  user  can
  43. enter  any  characters  contained in the list valid$.  CHR$(sc%) will be used to
  44. fill any unused spaces at the end of the field.  The following keys are  active:
  45. Ins,  Del,  Back  Space, Esc, the left and right arrows, and Enter.  Ins toggels
  46. insert mode.  Insert mode is indicated by a fat cursor  in  the  center  of  the
  47. character.    Normal  mode  is  indicated  by a thin cursor at the bottom of the
  48. character.  Del deletes one character and fills the vacated right  side  of  the
  49. field  with  a  CHR$(sc%).  Esc will restore the entry which was in the field at
  50. the time INPT was called.  Back Space moves the cursor one position to the  left
  51. and  removing  characters as it goes.  The left and right arrows move the cursor
  52. without affecting the text.  Enter is used to accept an entry and return to  the
  53. calling program.
  54.  
  55. CALL GETDATA(r%, c%, nChars%, R$, sc%) - This subprogram gets a string from  the
  56. screen  starting  at  row r% and column c% and extending for nChars% characters.
  57. Any spaces on the left or right of the returned string R$ are removed along with
  58. control characters and trailing CHR$(sc%)'s.
  59.  
  60. The ACCEPTAT.BAS, INPUT.BAS, P.BAS, GETDATA.BAS, and PROMPT.BAS files are public
  61. domain  and  may  be  used  in  any  way  without  restriction.    ADVBAS 3.4 is
  62. copyrighted and subject to the restrictions specified by the author.
  63.  
  64. Address any comments or criticisms to J.CLULOW GEnie E-Mail.
  65.