home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / qbasic / bkinpqb.zip / BKINPUT.DOC < prev    next >
Text File  |  1990-07-30  |  5KB  |  136 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.                                        BKInput
  29.  
  30.                     A Quickbasic and Microsoft Professional Basic
  31.                                  Edited input library
  32.  
  33.                                 Copyright (C) 1990 by:
  34.  
  35.                              Bill Hewitt, B&K Publishing
  36.                                   7868 NW 7th Court
  37.                               Plantation, FL 33324-1410
  38.                                     (305) 473-0938
  39.  
  40.                                  ALL RIGHTS RESERVED
  41.                             
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.                                        BKInput
  50.  
  51.                     A Quickbasic and Microsoft Professional Basic
  52.                                  Edited input library
  53.  
  54.  
  55.           INTRODUCTION
  56.  
  57.                As a BASIC programmer, I looked everywhere for a simple input
  58.                editor that supported numeric fields, decimals, and function keys
  59.                without having to use a windowed interface.
  60.  
  61.                Let's face it, windowed interfaces are great if you have 27 years
  62.                to write your program, but if you are writing an application for
  63.                your own use, it is hard to justify the time when a good line-at-
  64.                a-time interface will do the job.
  65.  
  66.                Also, most windowed interfaces virtually prohibit heads-down data
  67.                entry in an accounting program or similar applications.  I really
  68.                don't want to have to keep reaching from the number pad for the
  69.                F10 key to save a record.
  70.  
  71.                I was able to find several good input routines for alphanumerics,
  72.                but none that fully supported numerics and function keys.  The
  73.                best text input routine I found was FldEdit by Wayne Robinson.  I
  74.                based BKInput on his program because I found it fast and easy to
  75.                use and already had several programs developed with it.
  76.  
  77.                BKInput does not support foreground and background colors because
  78.                I have found that passing the colors to the subprogram every time
  79.                I called it was redundant because I usually get several fields of
  80.                input at a time and a COLOR statement before the input routines
  81.                gets the job done with one statement.
  82.  
  83.  
  84.           USAGE
  85.  
  86.                BKInput (BKRow%, BKCol%, BKLen%, BKNumeric%, BKKey%, BKTemp%)
  87.  
  88.  
  89.           PARAMETERS
  90.  
  91.                BKRow%         Row of first character of field
  92.                BKCol%         Column of first character of field
  93.                BKLen%         maximum length of field
  94.                BKNumeric%     if 0 entry is alphanumeric
  95.                               if -1 then entry is integer (no decimals)
  96.                               if >0 then entry is numeric with the number of
  97.                               decimal places specifies by BKNumeric%
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.                                        BKInput
  106.  
  107.                     A Quickbasic and Microsoft Professional Basic
  108.                                  Edited input library
  109.  
  110.  
  111.                BKKey%         if set to 0 when the BKInput is called then func-
  112.                               tion keys are not parsed.  Only ESCape and Car-
  113.                               riage return are parsed.
  114.                               if set to a value other than 0 when BKInput is
  115.                               called then function keys are parsed and value
  116.                               returned
  117.                BKTemp$        String to edit. If not "" then this string will be
  118.                               placed in the field by BKInput with the correct
  119.                               attribute.  The input string is returned in this
  120.                               variable.
  121.  
  122.  
  123.                The keys trapped with BKKey% are:
  124.                           F1 - F10             0,59 to 0,68
  125.                           Carriage Return      13
  126.                           Escape               27
  127.                           Tab                  9
  128.                           Home                 0,71
  129.                           End                  0,79
  130.                           PgUp                 0,73
  131.                           PgDn                 0,81
  132.                           Cursor Up            0,72
  133.                           Cursor Down          0,80
  134.  
  135.                BKEXAMP.BAS is included to demonstrate how to use the library.
  136.