home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / q_pro4a.zip / Q-START.DOC < prev    next >
Text File  |  1989-09-01  |  16KB  |  539 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.                   Q U I C   S T A R T   for  the  I M P A T I E N T
  11.                   =================================================
  12.  
  13.           For those of  you who  don't read the  documentation except as  a
  14.           last resort, this short guide is  dedicated.  We also assume that
  15.           you know exactly what you are doing!
  16.  
  17.           Things You Must Do
  18.           ------------------
  19.           1.  Unpack  the software.  The software  is  in a  self unpacking
  20.           format.  Simply log on the target drive and type the name of each
  21.           furnished .EXE file.
  22.  
  23.           2.  * * * *  LOAD BTSYS.EXE * * * * by typing BTSYS.  If you skip
  24.           this step, you won't be able to read or write data files.
  25.  
  26.           The Minimum
  27.           -----------
  28.           Q-PRO  4 uses  a  combination of  procedural  code and  "painted"
  29.           screens.  You  write the pro-gram and  paint the screen  with the
  30.           Binary Workstation editor. 
  31.  
  32.           File  handling  is    multikey  indexed  sequential,  random,  or
  33.           sequential.  Most  data files  are indexed.   Indexed and  random
  34.           files are defined with a File Item Description (FID) file.
  35.  
  36.           Getting On With It
  37.           ------------------
  38.           Load BW.EXE, the program editor.  You use BW to:
  39.  
  40.           -    write the programs.   It comes up ready to edit your program
  41.                code.  Functions are  initiated by  pressing function  keys.
  42.                The menu is shown at the bottom of the screen.  
  43.  
  44.                Pressing F10  will scroll  forward the functions  associated
  45.                with each function key.  Pressing F9 scrolls backwards.
  46.  
  47.             -  develop  the screens.   While in BW,  press F8 to  go to the
  48.                screen editor. Type the labels/prompts on the screen the way
  49.                you want then to  be.  Press F1 to bring up a window used to
  50.                define enterable screens.
  51.                
  52.             -  define the FID files.
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.                                       Quic-Start
  60.                                        Page - 1
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.           Putting It Together
  69.           ===================
  70.  
  71.           Application Overview
  72.           --------------------
  73.           Generally, you develop an application  one program (or screen) at
  74.           a time.  Programs  can freely "chain" each other into  and out of
  75.           memory.   Registers,  files  and disk  I/O buffers  remain intact
  76.           between screens.
  77.           Program Flow of Control
  78.           -----------------------
  79.           Q-PRO  4  is "Event  driven"  so  flow of  control  is completely
  80.           different than almost  every other language.   Control goes  back
  81.           and forth between the operator and program.  This is always under
  82.           the  control of  the programmer.   For example, when  the user is
  83.           entering data on  the screen, he has  control.  When he  moves to
  84.           the next enterable field, usually the programmer has control.
  85.  
  86.           Developing Programs
  87.           ------------------
  88.           The sequence of developing a program module is usually:
  89.  
  90.             1. Design the screen  and its  entry fields.   The screen  data
  91.                entry fields, once defined, are  the same as defining memory
  92.                variables, i.e. you  can interrogate their value,  move data
  93.                into and out of them, etc.
  94.            
  95.                One of  the fields to be  filled out when defining  a screen
  96.                data entry is "PROCEDURE NAME".   If you enter a name  here,
  97.                when the user  enters the field  and then goes  to the  next
  98.                field by pressing  return or an  arrow, the named  procedure
  99.                will be executed.
  100.  
  101.            2.  Write the program code.  The  program code is organized into
  102.                PROCEDURES or  PROC's.  A  procedure is  initiated with  the
  103.                keyword  (not too surprisingly) PROC followed by a space and
  104.                the name of the procedure.  PROC names (and all other names)
  105.                are limited to 10  characters in length and MUST  begin with
  106.                an  alpha character. (NOTE:  Q-PRO 4 treats  upper and lower
  107.                case identically.)
  108.  
  109.                PROCS are terminated with either an END or in the case  of a
  110.                "CALLed"  proc  RETURN.   When  the proc  terminates control
  111.                reverts  to the operator in the  enterable screen data field
  112.                that the programmer puts  him in.  Usually this is  the next
  113.                enterable  field,  but the  programmer  has full  control of
  114.                this. 
  115.  
  116.  
  117.  
  118.                                       Quic-Start
  119.                                        Page - 2
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.                  
  128.            3.  Designing the files.  Usually the  primary data file is very
  129.                similar to  the fields on the screen.   If this is the case,
  130.                the Quic FID facility can be utilized very effectively.
  131.  
  132.  
  133.            4.  Learning  the  language.    Look  over the  included  sample
  134.                programs  starting  with  SAMPINS.QNE.   They  are profusely
  135.                commented and illustrate some common coding techniques.
  136.  
  137.                Read the Commands Section  of the manual to see  the breadth
  138.                of commands available.
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.                                       Quic-Start
  178.                                        Page - 3
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.                                  Quic Reference Card
  187.                                  ===================
  188.  
  189.           IBM PC Terminal Keyboard Definitions
  190.  
  191.           Cursor Left . . . . . .  Left Arrow
  192.           Cursor Right. . . . . .  Right Arrow
  193.           Cursor Up . . . . . . .  Up Arrow
  194.           Cursor Down . . . . . .  Down Arrow
  195.           Cursor Home . . . . . .  Home
  196.           Tab       . . . . . . .  Return key
  197.           Back Tab  . . . . . . .  Shift Tab
  198.           Enter Data  . . . . . .  END
  199.           Function 0  . . . . . .  ESC
  200.           Funct 1-9   . . . . . .  F1-F9
  201.           Funct 11-20 . . . . . .  SF1-SF10
  202.           Clear Screen  . . . . .  Control Home
  203.           Clear to End of Line  .  Control End
  204.           Clear to End of Screen   Control Pg Down
  205.           Insert Character. . . .  Insert Key
  206.           Delete Character. . . .  Delete Key
  207.  
  208.  
  209.           COMMAND SYNTAX
  210.           --------------
  211.           Items within braces {} are optional.  Items within angle brackets
  212.           <> denote  a class of item, rather than  a literal value.  Square
  213.           brackets [] are required where shown.
  214.  
  215.           Field Descriptor Values
  216.           -----------------------
  217.           Space,x   any data
  218.           X         any data, forced to upper case
  219.           a         alphabetic data(A-Z,a-z,blank)
  220.           A         alphabetic data forced to upper case
  221.           m         alphanumeric data (A-Z, a-z, 0-9, blank)
  222.           M         alphanumeric data forced to upper  case (A-Z, a-z, 0-9,
  223.                     blank)
  224.           n,N       numeric data (0-9  +  -  .)
  225.           i,I       integer data (0-9  +  -)
  226.           d, D      digit data (0-9)
  227.  
  228.           Field Functions
  229.           ---------------
  230.           =    autoduplicate       ?    invisible field
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.                                  Quic Reference Card
  238.                                         Page 4
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.           Data Elements
  247.           --------------
  248.           Registers"     Numeric:  #N0  to   #N9
  249.                          String:   #S0  to   #S9
  250.                          Boolean:  #B0  to   #B9
  251.                          Error:    #E   Field:    #F
  252.                          Line:     #L   Keyout:   #K
  253.                          Page:     #P
  254.  
  255.           Screen Fields
  256.           -------------
  257.           $FIELD    [<expression>]      $OFFSET   [<screen    data    field
  258.           name>]
  259.  
  260.           File Fields
  261.           -----------
  262.           &<file field name>[<file #>]  &<file       field      name>[<file
  263.           #>,<index>]
  264.  
  265.           Literals
  266.           --------
  267.           String (". . ." or '. . .')    Numeric (1,37,5 etc.) 
  268.           Control character (@<value>)
  269.  
  270.           Variables
  271.           ---------
  272.           B - Boolean or bit (set(1) or reset(0))
  273.           I - Integer (-2,147,483,648 to 2,147,483,647)
  274.           F - Floating Point (1.7E-308 to 1.7E+308)
  275.           N - Numeric (0-9, decimal point, plus sign)
  276.           X - String (X indicates any data: alphanumeric, symbols, etc.)
  277.           <variable  name>   <N  or  X>,   <length>  {,<dimension>}  {,<2nd
  278.           dimension>}
  279.  
  280.  
  281.           Keyout Values (#K)
  282.           -------------
  283.             0 - Typed out               1 - Tabbed out
  284.             2 - Backtabbed out          3 - Cursor up
  285.             4 - Cursor down             5 - Cursor left
  286.             6 - Cursor right            7 - Enter
  287.             8 - Home                    9 - Any Function key
  288.            10 - Break
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.                                  Quic Reference Card
  298.                                         Page 5
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.                                        Commands
  309.                                        --------
  310.  
  311.           File Handling
  312.           -------------
  313.           BACKSPACE <file#>{:<error>}
  314.           CLOSE {file# or *}{:<error>}
  315.           COPY <file# or *> TO <file# or *> {:<error>}
  316.           ERASE <filename>{:<error>}
  317.           FCOPY <filename>TO<filename>{:<error>}
  318.           FILETYPE <file#>{:<error>}
  319.           FREE <file#>{:<error>}
  320.           FSEAR <file#>{NOADV}AT<condition> {:<error>}
  321.           GET <data or *> FROM <file#> FOR <length>{TRIMMED}{:<error>}
  322.           KEY <file#>USING<key#>{:<error>}
  323.           LRETRY  <retrycount>
  324.           MAKE/OPEN
  325.            sequential out
  326.                <filename>,0,<file#> {:<error>}
  327.            sequential in
  328.                <filename>,1,<file#>{:<error>} 
  329.            SDF out
  330.                <filename>,4,<file#>{:<error>}
  331.            SDF in
  332.                <filename>,5,<file#>{:<error>}
  333.           Random/Indexed 
  334.                <filename>USING<FIDname>{INDEX<indexname>},<file#>,
  335.           {UNLOCKED} {R/O}      {:<error>}
  336.           POSN <file#>  TO   <record  or   key>  {RELATIVE}   {USING<key#>}
  337.                {DESCENDING} {:<error>}
  338.           PUT <data or *> TO <file#>{FOR <length>}{:<error>}
  339.           RCLEAR <file#>{:<error>}
  340.           READ <file#>{NOADV}{:<error>}
  341.           RENAME <oldfilename>,<newfilename> {:<error>}
  342.           RESTART <file#>{TO<position>}{:<error>}
  343.           RLOCK <file#>{:<error>}
  344.           RUNLOCK <file#>{:error}
  345.           SECURE <file#>{:<error>}
  346.           WRITE <file#>{NOADV}{:<error>}
  347.  
  348.           Error Handling
  349.           --------------
  350.           ERROR <error message, register, or variable>
  351.           ERRTRAP {<line#>}
  352.           NCHECK <data>{:<error>}
  353.  
  354.  
  355.  
  356.  
  357.                                  Quic Reference Card
  358.                                         Page 6
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.           Data Formatting
  369.           ---------------
  370.           EDIT <expression>USING<picture>INTO <data>{:<error>}
  371.           CENTER <data>       CURRENCY <string>   LCASE <data>
  372.           LJUST <data>        RJUST <data>        S       I       Z       E
  373.           <data>INTO<data>{TRIMMED}
  374.           UCASE <data>        UNEDIT <data>INTO<data>{:<error>}
  375.  
  376.           Arithmetic
  377.           ----------
  378.           ACCURACY <value>         ADD <data>TO<data>{GIVING <data>}
  379.           CALC <data>=<expression> MUL <data>TIMES<data>{GIVING <data>}
  380.           ROUND <expression>BY<expression>INTO <data>
  381.           SUB <data>FROM<data>{GIVING <data>}
  382.  
  383.           Logical
  384.           -------
  385.           RESET <Boolean register or variable>    SET <Boolean  register or
  386.           variable>
  387.  
  388.           Control Transfer
  389.           ----------------
  390.           BEGIN {WHILE/UNTIL/IF <condition>}
  391.           ELSE {IF<condition>}
  392.           ENDBEGIN {WHILE/UNTIL <condition>}
  393.           BROFF     BRON
  394.           CALL <procedure>    CALL <table[index]>
  395.           CHAIN <filename>{:error}
  396.           END
  397.           FOR <index>=<expression>TO<expression>BY<expression>
  398.           ENDFOR <index>
  399.           GOTO <label>        GOTO <table[index]>
  400.           RETURN
  401.  
  402.           Conditional
  403.           -----------
  404.           IF<condition>{THEN}<statement>
  405.  
  406.           Screen Control
  407.           --------------
  408.           CLEAR <field or *>            CURSOR <row>,<column>
  409.           BUFFER <expression>           FILL <character>
  410.           PRINT <data>{,<data> . . .}   HELP <screen>{,<screen>}{:<error>}
  411.           HOME           HOMECLEAR      HOFF      HON
  412.           LOCK <field>   NEXT <field>
  413.           RESUME
  414.           UNLOCK <field or *>
  415.  
  416.  
  417.                                  Quic Reference Card
  418.                                         Page 7
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.           Data Movement
  429.           -------------
  430.           CONCAT    <data>{[<start>,<length    or    *>]     }    {TRIMMED}
  431.           +<data>{[<start>,<length          or *>]} {TRIMMED} +.   .  .   .
  432.           INTO <data>{[<start or *>]} {TRIMMED}
  433.           MOVE <data> {[<start>,<length or *>]} TO <data> { [<start or *>]}
  434.           {TRIMMED}
  435.  
  436.           Table Management
  437.           ----------------
  438.           TABLE <table name>
  439.           TSEAR <table> AT <key>{,<data>, <data>}{:<error>}
  440.           ASEAR <array name> {DOWN} USING <index> AT <condition> {:<error>}
  441.  
  442.           Date Handling
  443.           -------------
  444.           JDPACK <string> INTO <data>        JDUNPACK <data> INTO <string>
  445.           GETDATE <data>                     SETDATE <data>
  446.  
  447.           Operating System Interface
  448.           FORMLOAD            NOFORMLOAD
  449.           SYSTEM              LPDETACH
  450.           HOST <host system> {:<error>} 
  451.           RUN <file  name> USING  <parameter>{NOPAUSE} {NORETURN}  {RELOAD}
  452.           <filename>}     {CONTINUE} {:<error>}
  453.  
  454.           Miscellaneous
  455.           -------------
  456.           *    comment
  457.           SYSMODE BTAB <SET or RESET>
  458.                   LPCHK <SET or RESET>
  459.           PRINTSCN {:<error>} 
  460.           INSTR <substring>{TRIMMED},<string>{TRIMMED},<result>
  461.  
  462.           Debugging
  463.           ---------
  464.           NOTRACE        TRACE          DEBUG
  465.            
  466.           Assembler Interface
  467.           -------------------
  468.           DEFSEG {<address>}
  469.           EXEC <input  string> {,<output  string>} {:<error>}
  470.           LOAD <filename>,<address>{:<error>}
  471.           PEEK <address>, <length>, <data>   POKE <address>, <data>
  472.  
  473.  
  474.  
  475.  
  476.  
  477.                                  Quic Reference Card
  478.                                         Page 8
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.                                   SPECIAL PROCEDURES
  489.                                   ==================
  490.  
  491.           PROC BREAK          PROC ENTER          PROC ERROR
  492.           PROC  KEY<N>        PROC LOAD
  493.  
  494.  
  495.                                       FUNCTIONS
  496.                                       ---------
  497.  
  498.           ASCII Value:   $ASC()         e to Power:    $ETOX()
  499.           Scrn.Field No.:$FIELD()       Integer Value: $INT()
  500.           Top of memory: $MEMEND()      Natural Log:   $LN()
  501.           Screen Offset: $OFFSET()
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.                                  Quic Reference Card
  538.                                         Page 9
  539.