home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
database
/
q_pro4a.arc
/
Q-START.DOC
< prev
next >
Wrap
Text File
|
1989-09-01
|
16KB
|
539 lines
Q U I C S T A R T for the I M P A T I E N T
=================================================
For those of you who don't read the documentation except as a
last resort, this short guide is dedicated. We also assume that
you know exactly what you are doing!
Things You Must Do
------------------
1. Unpack the software. The software is in a self unpacking
format. Simply log on the target drive and type the name of each
furnished .EXE file.
2. * * * * LOAD BTSYS.EXE * * * * by typing BTSYS. If you skip
this step, you won't be able to read or write data files.
The Minimum
-----------
Q-PRO 4 uses a combination of procedural code and "painted"
screens. You write the pro-gram and paint the screen with the
Binary Workstation editor.
File handling is multikey indexed sequential, random, or
sequential. Most data files are indexed. Indexed and random
files are defined with a File Item Description (FID) file.
Getting On With It
------------------
Load BW.EXE, the program editor. You use BW to:
- write the programs. It comes up ready to edit your program
code. Functions are initiated by pressing function keys.
The menu is shown at the bottom of the screen.
Pressing F10 will scroll forward the functions associated
with each function key. Pressing F9 scrolls backwards.
- develop the screens. While in BW, press F8 to go to the
screen editor. Type the labels/prompts on the screen the way
you want then to be. Press F1 to bring up a window used to
define enterable screens.
- define the FID files.
Quic-Start
Page - 1
Putting It Together
===================
Application Overview
--------------------
Generally, you develop an application one program (or screen) at
a time. Programs can freely "chain" each other into and out of
memory. Registers, files and disk I/O buffers remain intact
between screens.
Program Flow of Control
-----------------------
Q-PRO 4 is "Event driven" so flow of control is completely
different than almost every other language. Control goes back
and forth between the operator and program. This is always under
the control of the programmer. For example, when the user is
entering data on the screen, he has control. When he moves to
the next enterable field, usually the programmer has control.
Developing Programs
------------------
The sequence of developing a program module is usually:
1. Design the screen and its entry fields. The screen data
entry fields, once defined, are the same as defining memory
variables, i.e. you can interrogate their value, move data
into and out of them, etc.
One of the fields to be filled out when defining a screen
data entry is "PROCEDURE NAME". If you enter a name here,
when the user enters the field and then goes to the next
field by pressing return or an arrow, the named procedure
will be executed.
2. Write the program code. The program code is organized into
PROCEDURES or PROC's. A procedure is initiated with the
keyword (not too surprisingly) PROC followed by a space and
the name of the procedure. PROC names (and all other names)
are limited to 10 characters in length and MUST begin with
an alpha character. (NOTE: Q-PRO 4 treats upper and lower
case identically.)
PROCS are terminated with either an END or in the case of a
"CALLed" proc RETURN. When the proc terminates control
reverts to the operator in the enterable screen data field
that the programmer puts him in. Usually this is the next
enterable field, but the programmer has full control of
this.
Quic-Start
Page - 2
3. Designing the files. Usually the primary data file is very
similar to the fields on the screen. If this is the case,
the Quic FID facility can be utilized very effectively.
4. Learning the language. Look over the included sample
programs starting with SAMPINS.QNE. They are profusely
commented and illustrate some common coding techniques.
Read the Commands Section of the manual to see the breadth
of commands available.
Quic-Start
Page - 3
Quic Reference Card
===================
IBM PC Terminal Keyboard Definitions
Cursor Left . . . . . . Left Arrow
Cursor Right. . . . . . Right Arrow
Cursor Up . . . . . . . Up Arrow
Cursor Down . . . . . . Down Arrow
Cursor Home . . . . . . Home
Tab . . . . . . . Return key
Back Tab . . . . . . . Shift Tab
Enter Data . . . . . . END
Function 0 . . . . . . ESC
Funct 1-9 . . . . . . F1-F9
Funct 11-20 . . . . . . SF1-SF10
Clear Screen . . . . . Control Home
Clear to End of Line . Control End
Clear to End of Screen Control Pg Down
Insert Character. . . . Insert Key
Delete Character. . . . Delete Key
COMMAND SYNTAX
--------------
Items within braces {} are optional. Items within angle brackets
<> denote a class of item, rather than a literal value. Square
brackets [] are required where shown.
Field Descriptor Values
-----------------------
Space,x any data
X any data, forced to upper case
a alphabetic data(A-Z,a-z,blank)
A alphabetic data forced to upper case
m alphanumeric data (A-Z, a-z, 0-9, blank)
M alphanumeric data forced to upper case (A-Z, a-z, 0-9,
blank)
n,N numeric data (0-9 + - .)
i,I integer data (0-9 + -)
d, D digit data (0-9)
Field Functions
---------------
= autoduplicate ? invisible field
Quic Reference Card
Page 4
Data Elements
--------------
Registers" Numeric: #N0 to #N9
String: #S0 to #S9
Boolean: #B0 to #B9
Error: #E Field: #F
Line: #L Keyout: #K
Page: #P
Screen Fields
-------------
$FIELD [<expression>] $OFFSET [<screen data field
name>]
File Fields
-----------
&<file field name>[<file #>] &<file field name>[<file
#>,<index>]
Literals
--------
String (". . ." or '. . .') Numeric (1,37,5 etc.)
Control character (@<value>)
Variables
---------
B - Boolean or bit (set(1) or reset(0))
I - Integer (-2,147,483,648 to 2,147,483,647)
F - Floating Point (1.7E-308 to 1.7E+308)
N - Numeric (0-9, decimal point, plus sign)
X - String (X indicates any data: alphanumeric, symbols, etc.)
<variable name> <N or X>, <length> {,<dimension>} {,<2nd
dimension>}
Keyout Values (#K)
-------------
0 - Typed out 1 - Tabbed out
2 - Backtabbed out 3 - Cursor up
4 - Cursor down 5 - Cursor left
6 - Cursor right 7 - Enter
8 - Home 9 - Any Function key
10 - Break
Quic Reference Card
Page 5
Commands
--------
File Handling
-------------
BACKSPACE <file#>{:<error>}
CLOSE {file# or *}{:<error>}
COPY <file# or *> TO <file# or *> {:<error>}
ERASE <filename>{:<error>}
FCOPY <filename>TO<filename>{:<error>}
FILETYPE <file#>{:<error>}
FREE <file#>{:<error>}
FSEAR <file#>{NOADV}AT<condition> {:<error>}
GET <data or *> FROM <file#> FOR <length>{TRIMMED}{:<error>}
KEY <file#>USING<key#>{:<error>}
LRETRY <retrycount>
MAKE/OPEN
sequential out
<filename>,0,<file#> {:<error>}
sequential in
<filename>,1,<file#>{:<error>}
SDF out
<filename>,4,<file#>{:<error>}
SDF in
<filename>,5,<file#>{:<error>}
Random/Indexed
<filename>USING<FIDname>{INDEX<indexname>},<file#>,
{UNLOCKED} {R/O} {:<error>}
POSN <file#> TO <record or key> {RELATIVE} {USING<key#>}
{DESCENDING} {:<error>}
PUT <data or *> TO <file#>{FOR <length>}{:<error>}
RCLEAR <file#>{:<error>}
READ <file#>{NOADV}{:<error>}
RENAME <oldfilename>,<newfilename> {:<error>}
RESTART <file#>{TO<position>}{:<error>}
RLOCK <file#>{:<error>}
RUNLOCK <file#>{:error}
SECURE <file#>{:<error>}
WRITE <file#>{NOADV}{:<error>}
Error Handling
--------------
ERROR <error message, register, or variable>
ERRTRAP {<line#>}
NCHECK <data>{:<error>}
Quic Reference Card
Page 6
Data Formatting
---------------
EDIT <expression>USING<picture>INTO <data>{:<error>}
CENTER <data> CURRENCY <string> LCASE <data>
LJUST <data> RJUST <data> S I Z E
<data>INTO<data>{TRIMMED}
UCASE <data> UNEDIT <data>INTO<data>{:<error>}
Arithmetic
----------
ACCURACY <value> ADD <data>TO<data>{GIVING <data>}
CALC <data>=<expression> MUL <data>TIMES<data>{GIVING <data>}
ROUND <expression>BY<expression>INTO <data>
SUB <data>FROM<data>{GIVING <data>}
Logical
-------
RESET <Boolean register or variable> SET <Boolean register or
variable>
Control Transfer
----------------
BEGIN {WHILE/UNTIL/IF <condition>}
ELSE {IF<condition>}
ENDBEGIN {WHILE/UNTIL <condition>}
BROFF BRON
CALL <procedure> CALL <table[index]>
CHAIN <filename>{:error}
END
FOR <index>=<expression>TO<expression>BY<expression>
ENDFOR <index>
GOTO <label> GOTO <table[index]>
RETURN
Conditional
-----------
IF<condition>{THEN}<statement>
Screen Control
--------------
CLEAR <field or *> CURSOR <row>,<column>
BUFFER <expression> FILL <character>
PRINT <data>{,<data> . . .} HELP <screen>{,<screen>}{:<error>}
HOME HOMECLEAR HOFF HON
LOCK <field> NEXT <field>
RESUME
UNLOCK <field or *>
Quic Reference Card
Page 7
Data Movement
-------------
CONCAT <data>{[<start>,<length or *>] } {TRIMMED}
+<data>{[<start>,<length or *>]} {TRIMMED} +. . . .
INTO <data>{[<start or *>]} {TRIMMED}
MOVE <data> {[<start>,<length or *>]} TO <data> { [<start or *>]}
{TRIMMED}
Table Management
----------------
TABLE <table name>
TSEAR <table> AT <key>{,<data>, <data>}{:<error>}
ASEAR <array name> {DOWN} USING <index> AT <condition> {:<error>}
Date Handling
-------------
JDPACK <string> INTO <data> JDUNPACK <data> INTO <string>
GETDATE <data> SETDATE <data>
Operating System Interface
FORMLOAD NOFORMLOAD
SYSTEM LPDETACH
HOST <host system> {:<error>}
RUN <file name> USING <parameter>{NOPAUSE} {NORETURN} {RELOAD}
<filename>} {CONTINUE} {:<error>}
Miscellaneous
-------------
* comment
SYSMODE BTAB <SET or RESET>
LPCHK <SET or RESET>
PRINTSCN {:<error>}
INSTR <substring>{TRIMMED},<string>{TRIMMED},<result>
Debugging
---------
NOTRACE TRACE DEBUG
Assembler Interface
-------------------
DEFSEG {<address>}
EXEC <input string> {,<output string>} {:<error>}
LOAD <filename>,<address>{:<error>}
PEEK <address>, <length>, <data> POKE <address>, <data>
Quic Reference Card
Page 8
SPECIAL PROCEDURES
==================
PROC BREAK PROC ENTER PROC ERROR
PROC KEY<N> PROC LOAD
FUNCTIONS
---------
ASCII Value: $ASC() e to Power: $ETOX()
Scrn.Field No.:$FIELD() Integer Value: $INT()
Top of memory: $MEMEND() Natural Log: $LN()
Screen Offset: $OFFSET()
Quic Reference Card
Page 9