home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_BAS / PRO98DOC.ZIP / PROZOL.DOC next >
Text File  |  1993-12-20  |  99KB  |  2,681 lines

  1. ******** SEE "README" FILE FOR A LIST OF CHANGES AND ADDITIONS.  THIS MANUAL
  2.          IS FOR BETA TEST VERSION 0.90.  Additions for each beta version are
  3.          itemized in the README file.  These changes will eventually be
  4.          updated to this document.
  5.  
  6.  
  7. PROZOL BBS LANGUAGE
  8. ===================
  9.  
  10. Copyright (C) 1993  Erik Lee Olson  All rights reserved
  11. Mermaid Software Products, Largo, Florida
  12.  
  13.  
  14. PROZOL is an extremely simple language to learn, easier than BASIC.  The
  15. interpreter allows you to type in small programs or enter direct
  16. statements and run them just like the old style GWBASIC interpreter.  It
  17. would be best, however, to use a text editor like QEdit or the DOS EDIT
  18. program to create your programs.
  19.  
  20. The purpose of PROZOL is to write BBS programs.  PROZOL features a wide
  21. range of commands and functions to make this as easy as possible while
  22. offering the flexibility of a complete high level programming language.
  23.  
  24. In addition to normal language features, PROZOL has built-in facilities
  25. for messages and conferencing, binary file transfer, dBASE databases,
  26. multiple node chat and hot messages, animated ANSI menus, global
  27. variables (accessible to all nodes on a network), and much more.
  28.  
  29. When you create a program it will run exactly the way you see it on a
  30. remote ANSI terminal.
  31.  
  32. RUNNING THE PROZOL INTERPRETER
  33. ==============================
  34.  
  35. To run PROZOL in local mode just type PROZOL at the DOS prompt.  You can
  36. place A PROZOL command to execute on the command line if you wish.
  37.  
  38.         C:\PROZOL\> PROZOL
  39.         C:\PROZOL\> PROZOL Run "startup"
  40.  
  41.  
  42. QUIT OR RESET
  43. =============
  44.  
  45. Type "QUIT" at the Prozol prompt to exit to DOS (or SYSTEM).  To reset Prozol
  46. at any time (restart and/or re-run command line parameters) press CTRL-C or
  47. type the command LOGOUT, RESET, or RESTART.
  48.  
  49.  
  50. CONFIGURATION
  51. =============
  52.  
  53. If you have never run PROZOL before it will prompt you to answer a few
  54. questions which are necessary for PROZOL to run.
  55.  
  56.         1200 2400 4800 9600 14400 19200 38400
  57.         Enter opening baud rate (default 2400) --> _
  58.  
  59.  
  60. Even though you are not using the modem yet, PROZOL needs to know the
  61. opening baud rate for on-line sessions.  If you enter 1200 or 2400 PROZOL
  62. will initialize the modem at this baud rate and then adjust to whatever
  63. speed the modem connects at.  For baud rates of 9600 and higher PROZOL
  64. will remain at a fixed baud rate.
  65.  
  66.         Enter modem parameters (N,8,1,ME,FE,DT) --> _
  67.  
  68. These are the default modem parameters, although some modems may require
  69. that you supress the RTS and CTS lines, in which case you would add
  70. RS,CS to the parameter list.  ME and FE are required for masking framing
  71. and overrun errors.  DT is required to keep the DTR line high during
  72. door program execution.
  73.  
  74.         Chat file path\name (preferably on a RAM disk) --> _
  75.  
  76. The default chat file is CHAT.RAF which will be created in the current
  77. directory when needed.  For improved performance a network chat file
  78. should be located in a network RAM disk.  If you will not be running
  79. multiple nodes of PROZOL then this setting is not important.
  80.  
  81.         OLM Directory (i.e. F:\OLM\   default is root) --> _
  82.  
  83. OLM's are On Line Messages which can be sent from any user to any user.
  84. If the addressee is currently on-line the message will display
  85. immediately on the user's screen.  If the user is not currently on line
  86. the message will be displayed as soon as the user logs in.  These
  87. messages must be stored somewhere.
  88.  
  89.         CONFERENCE Directory (default is root) --> _
  90.  
  91. Conference files contain many messages which are entered and viewed by
  92. all of the users.  You must specify a directory to keep these files in.
  93.  
  94.         COMMON variable file (default is COMMON.VAR) --> _
  95.  
  96. On a network, each node can create and access variables which are global
  97. to every copy of PROZOL running.  In order to use these common variables
  98. PROZOL needs to store them in a file.  Placing this file in a RAM disk
  99. improves performance.
  100.  
  101.         MAIL Directory (default is root) --> _
  102.  
  103. Private mail must be stored in a file along with indexes.  You must
  104. specify a directory to keep these in.
  105.  
  106.         Default system prompt:
  107.         1) OK (like gwbasic)
  108.         2) {HOST}>
  109.         3) Command:
  110.         4) C:\> (like dos)
  111.         5) No prompt - automatically log out user if prompt is displayed.
  112.         Select --> _
  113.  
  114. When you are experimenting with PROZOL and running programs in local mode
  115. PROZOL needs to display a prompt.  You may also allow remote users to
  116. access the PROZOL command prompt if you trust them.  You can select from
  117. four different types of prompts or use selection 5 to cause the command
  118. prompt to immediately logout a remote user.  This setting may be
  119. desireable to prevent a program from accidently ending and leaving the
  120. caller at a command prompt from where they could re-format your hard
  121. drive if they knew how.  You can select a normal prompt, such as number
  122. 1 and then use the PROZOL command SETPROMPT to change it later for
  123. security.
  124.  
  125.         Execute on CONNECT (END=cmd mode) (default=GO MAIN) --> _
  126.  
  127. When a caller dials in and PROZOL answers the phone you will want to
  128. start running PROZOL programs.  You should write a startup program that
  129. asks for a name and password or allows new callers to obtain one.  If
  130. you named this startup program MAIN.PRO, then the command GO MAIN or RUN
  131. "MAIN" would cause PROZOL to run the MAIN.PRO program when the caller
  132. connects.
  133.  
  134. Once you have answered these questions, PROZOL will create a
  135. configuration file in the current directory.  To answer these questions
  136. again, erase the file PROZOL.CFG and run PROZOL again, or enter the
  137. command CONFIG at the PROZOL prompt.
  138.  
  139. SETTING UP PROZOL TO ANSWER THE PHONE
  140. =====================================
  141.  
  142. To run PROZOL in remote mode, execute the PROZOL.EXE program with the
  143. desired com port specified on the command line.
  144.  
  145.         C:\PROZOL\> PROZOL COM1:
  146.  
  147. You may use COM1:, COM2:, COM3:, or COM4:.  If you wish to use a non
  148. standard port (such as a multi-channel serial board) you may specify the
  149. port and irq numbers on the command line.
  150.  
  151.         C:\PROZOL\> PROZOL COM4: /PORT=0220 /IRQ=5
  152.  
  153. PROZOL will initialize the modem and place it in answer mode.  It will
  154. wait for an incoming call and recycle every 60 minutes to keep the modem
  155. awake (some modems go to sleep if they are not reinitialized every so
  156. often).  To exit to DOS press ESC or press F10 to take the modem out of
  157. answer mode and go to into local mode.
  158.  
  159. An initialization string of ATS0=1 is used to place the modem into
  160. answer mode.  It may be necessary to change this initialization string
  161. on some modems.  Initialization strings are contained in files called
  162. INIT1 through INIT4 in the current directory.  If the file does not
  163. exist it will be created with the string ATS0=1 in it.  You can edit
  164. this file if you wish.
  165.  
  166. When a call comes in and PROZOL answers it, PROZOL will execute the
  167. command specified in the config file to execute on answer.  The default
  168. command to execute is "GO MAIN" which will load and run a program file
  169. called MAIN.PRO in the current directory.  This program should prompt the
  170. user for some sort of password before continuing.  From here you can run
  171. other programs in a continuous chain.  The command LOGOUT will hang up
  172. and reset PROZOL to answer the phone again.
  173.  
  174.         ' test sample MAIN.PRO
  175.         CLS
  176.         PRINT "This is a test!"
  177.         PRINT "Press any key..."
  178.         CWAIT
  179.         LOGOUT
  180.  
  181. If you created the above program and placed it in the current directory
  182. along with PROZOL.EXE, PROZOL.CFG and the INITx files, then run PROZOL with
  183. the com port name on the command line, PROZOL will reset the modem and
  184. wait for an incoming call.  When a call comes in the caller will see the
  185. screen clear and the two lines of text displayed.  The system will wait
  186. for a key press and then hang up, resetting itself for another call.
  187.  
  188. LEARNING THE PROZOL LANGUAGE
  189. ============================
  190.  
  191. PROZOL is a very simple language.  If you know BASIC then PROZOL will be a
  192. snap.  PROZOL is similar to BASIC, however there are some substantial
  193. differences which you will see as we go along.
  194.  
  195. The best way to become familiar with PROZOL is to play with the
  196. interpreter directly and watch what happens when we enter certain
  197. commands.  Once you become familiar with putting together simple
  198. one-line statements or very short programs, then you should be able to
  199. load up your text editor and start putting together a full blown,
  200. completely original BBS program.
  201.  
  202. (((A Pseudo-compiler will be available shortly to allow you to create
  203. distributable, unmodifiable and royalty-free on line systems.)))
  204.  
  205. Start up PROZOL and enter a few direct PRINT statements. (the symbol > is
  206. used to indicate A PROZOL prompt, which can actually be anything.  The
  207. default prompt is OK followed by a carriage return)
  208.  
  209.         >PRINT "Hello World"
  210.         Hello World
  211.         >PRINT 1 2 3
  212.         1 2 3
  213.  
  214. When you type in statements at the PROZOL prompt they will be executed as
  215. soon as you press ENTER.  Try this:
  216.  
  217.         >PRINT "This": PRINT "is": PRINT "a":PRINT "test!"
  218.         This
  219.         is
  220.         a
  221.         test!
  222.  
  223. Multiple statements can be placed on the same line separated by colons,
  224. just like BASIC.  Now try this one:
  225.  
  226.         >INPUT "What is your name?";NAME
  227.         What is your name?_
  228.  
  229. The INPUT statement works just like BASIC in this manner.  You may
  230. follow INPUT with an optional prompt in quotes, followed by a delimiter
  231. and a variable name to accept the input.  You will notice that there is
  232. no $ after the variable name.  You could put one there if you wanted to,
  233. but PROZOL does not differentiate between string variables and numeric
  234. variables, so a dollar sign is not necessary to tell PROZOL that it is a
  235. string variable.  Since a dollar sign and other BASIC variable type
  236. identifyer symbols are valid in variable names, you could use them if
  237. you wanted to.
  238.  
  239. The INPUT statement will display the optional prompt and then wait for
  240. something to be entered at the keyboard.  When the user presses ENTER
  241. whatever was typed in will be contained in the variable.
  242.  
  243. Like BASIC, variables do not have to be declared before they are used in
  244. an command like this.
  245.  
  246. Notice that the prompt and the variable were separated by a semi-colon.
  247. In BASIC you would use either a semicolon or a comma to separate the
  248. parameters of most commands.  In PROZOL you may use a semicolon, comma,
  249. space, or DUMMY KEYWORD to parse statements in any manner you wish.  In
  250. other words, these statements are all identical:
  251.  
  252.         INPUT "What is your name?";NAME
  253.         INPUT "What is your name?" NAME
  254.         INPUT    "What is your name?",,,,,,,,,,,,,NAME
  255.         INPUT "What is your name?" TO NAME
  256.  
  257. Notice the last line, where the word TO was placed between the prompt
  258. and the variable NAME.  TO is a DUMMY KEYWORD which does nothing.  It is
  259. not even seen by PROZOL.  The purpose of these dummy keywords is to make
  260. your source code more readable.  There are many dummy keywords that you
  261. may use freely wherever you wish.  For example, try this line:
  262.  
  263.         PRINT "HI THERE!" AT LOCATE 10,10 IN COLOR 0,7
  264.  
  265. This line is the same as
  266.  
  267.         COLOR 0,7:LOCATE 10,10:PRINT "HI THERE!"
  268.  
  269. Do you see the difference?  The second line has the statements listed in
  270. the opposite order as the first.  The second line also has colons (:)
  271. separating the statements.  Statements separated by colons are executed
  272. in sequence, while statements separated by any other parsing character
  273. or dummy keyword are executed "all at once".
  274.  
  275. If no colons (or carriage returns) separate multiple statements, then
  276. all of the statements will be evaluated before they are executed.  A
  277. simpler way to look at it is like this:  Multiple statements on the same
  278. line will be executed in reverse order if they are NOT separated by
  279. semicolons.
  280.  
  281. For example, if you were to say
  282.  
  283.         PRINT 1 : PRINT 2 : PRINT 3
  284.  
  285. Then PROZOL would print
  286.  
  287.         1
  288.         2
  289.         3
  290.  
  291. However, if you were to say
  292.  
  293.         PRINT 1 PRINT 2 PRINT 3
  294.  
  295. Then PROZOL would print
  296.  
  297.         3
  298.         2
  299.         1
  300.  
  301. If this seems a little strange to you then you will just have to be
  302. trusting.  There are some very good reasons for the syntax to work this
  303. way.  If you do not like the idea of multiple statements being executed
  304. in reverse order then just don't worry about it and separate all of your
  305. commands with colons or carriage returns.  The advantages of this syntax
  306. option should become more clear as you see more examples.
  307.  
  308. ENTERING A PROGRAM
  309.  
  310. PROZOL uses line numbers to to enter and edit lines of a program, however
  311. the line numbers are not stored when you save the program to disk.  You
  312. cannot use line numbers with GOTO or GOSUB statements.  You must use
  313. labels.  Enter this program at the PROZOL prompt:
  314.  
  315.         >1 START
  316.         >2 PRINT "This is a test!"
  317.         >3 INCR A
  318.         >4 PRINT A
  319.         >5 GOTO START IF SAME INKEY ""
  320.  
  321. After you have entered the program, type RUN at the PROZOL prompt:
  322.  
  323.         >RUN
  324.         This is a test!
  325.         1
  326.         This is a test!
  327.         2
  328.         This is a test!
  329.         3
  330.  
  331. The program will continue to display and count until you press any key.
  332. You have probably already noticed two very odd things about this
  333. program.  First, line 1 is a label called START.  PROZOL labels are
  334. single words that are not keywords. Label names can be things like START
  335. or BEGIN or GETINPUT or KILLME.  Labels must be all by themselves on a
  336. line.  When you GOTO or GOSUB to a label, execution will jump to the line
  337. immediately following the label.
  338.  
  339. Now you may have noticed something else kind of strange about the little
  340. five line program.  Type LIST at the PROZOL prompt and view the lines of
  341. the program that are currently in memory.  If you wanted to list a
  342. single line of the program, line 5, for instance, you could just say
  343. LIST 5.  If you wanted to view a range of lines you could say
  344. LIST 1 TO 4, or just LIST 1 4.  TO is a dummy keyword, since LIST
  345. requires only two parameters to list a range of lines, you can use TO,
  346. or just separate the two parameters with a space, comma or semicolon.
  347.  
  348. Now look at line 5.
  349.  
  350.         GOTO START IF SAME INKEY ""
  351.  
  352. This line consists of several distinct actions.  This line would also be
  353. the same as
  354.  
  355.         IF SAME INKEY : GOTO START
  356.  
  357. The IF tests if what we want to do first.  IF SAME INKEY "".  In PROZOL,
  358. character variables must be compared with the SAME function.  SAME
  359. followed by two character arguments will return a true or false if they
  360. are the same.  The IF command will abort the current statement if the
  361. condition which follows it is false, so if you are using a colon to
  362. separate the statements GOTO START and IF SAME INKEY "" then the IF
  363. statement must come first.  If you are not using colons to separate the
  364. statements then the IF must follow what you want to do if the IF
  365. evaluates true.
  366.  
  367. There is no THEN keyword in PROZOL since it is not really necessary.
  368. Conditions such as IF, WHILE and UNTIL are followed by any expression
  369. which will either be true or false.  If the expression indicates that
  370. the remainder of the line should not be executed then PROZOL will skip
  371. ahead to the next line.  Here are some examples:
  372.  
  373.         UNTIL LEN INKEY
  374.  
  375. This expression will wait for a key to be pressed.  It is not really
  376. necessary, though, since the command CWAIT will do the same thing.
  377.  
  378.         WHILE NOT LEN INKEY
  379.  
  380. This line will continue to iterate as long as the expression NOT LEN
  381. INKEY is true.  That is, until a key is pressed.  INKEY returns a
  382. character waiting in the keyboard buffer, or null of no key has been
  383. pressed.
  384.  
  385. Since we now know that expressions will be executed from left to right
  386. if they are separated by colons, or from right to left if they are not
  387. separated by colons, we can understand how these following complex
  388. expressions would operate:
  389.  
  390.         UNTIL SAME INKEY," ": PRINT "Press SPACE to stop!"
  391.  
  392. This line will keep printing "Press SPACE to stop!" until the user hits
  393. the space bar.
  394.  
  395.         WHILE EVAL A<10: INCR A: PRINT A
  396.  
  397. This line will print the numbers 1 to 10 and then stop.
  398.  
  399. There is something critical that you should know about the last example.
  400. The EVAL keyword returns the result of a numeric expression.  For
  401. example,
  402.  
  403.         PRINT 1+1
  404.  
  405. Will print
  406.  
  407.         1+1
  408.  
  409. on the screen!  In order to evaluate an arithmetic expression, you must
  410. precede it with the EVAL keyword.
  411.  
  412.         PRINT EVAL 1+1
  413.  
  414. will print
  415.  
  416.         2
  417.  
  418. on the screen.  The reason for this is speed.  Since PROZOL does not need
  419. to check for arithmetic expressions while interpreting each statement it
  420. runs a great deal faster.  The keyword EVAL tells PROZOL to evaluate all
  421. parameters as though they were arithmetic.  EVAL has some synonyms that
  422. you may use interchangeably for readability.  CALC and WITH do the same
  423. thing.
  424.  
  425.         PRINT EVAL 1+1
  426.         PRINT CALC A+B
  427.         PRINT CALC (1+1)*A/256 ^7
  428.         PRINT "The answer is " CALC A/B
  429.  
  430.  
  431.  
  432. This brings us to variables.  A PROZOL variable can be any alphanumeric
  433. sequence of characters which are not arithmetic operators.  PROZOL
  434. variables cannot begin with a number but may contain them.
  435.  
  436. In BASIC you can assign a value to a variable by just saying
  437.  
  438.         LET A=1
  439.  
  440. In PROZOL, however, you cannot use the equals sign to assign a value.
  441. You must simply omit it:
  442.  
  443.         LET A 1
  444.  
  445. Or you can insert the dummy keyword BE to make the statement more
  446. readable:
  447.  
  448.         LET A BE 1
  449.  
  450. You can also use the keyword SET instead of LET.  In this case you
  451. can use the dummy keyword TO, as in
  452.  
  453.         SET A TO 1
  454.  
  455. A variable does not have to be declared before it is used.  For example,
  456. you could say
  457.  
  458.         INCR A
  459.  
  460. and if A does not exist then it will be incremented to 1 from 0.  A
  461. variable which does not exist is assumed to be null, so if you tried to
  462. print a null variable, a "" (blank) would be displayed.  You could, however,
  463. assign it to a string value, or even a null string.  You must assign a value
  464. of 0 to a variable if you wish to assume that it is 0 in an arithmetic
  465. expression.  Conditional tests like IF or WHILE will assume a null to have
  466. a zero value, however.  In other words, if A is undefined, then IF A will
  467. evaluate false.
  468.  
  469. In an arithmetic expression a variable is assumed to be 0, however if it
  470. is used in a string test (SAME) then it is assumed to be null if it is
  471. not defined.  Therefore, if A is not defined, then
  472.  
  473.         PRINT SAME A ""
  474.  
  475. will print -1, which is TRUE.  However,
  476.  
  477.         PRINT EVAL A
  478.  
  479. will print 0, since the arithmetic value of A is 0.
  480.  
  481. As we have seen, conditional execution of lines can be decided with IF,
  482. UNTIL or WHILE which decide whether or not the rest of the line is to be
  483. executed or repeated.  You can also create block conditional execution
  484. of statements.  In BASIC and other languages, you can begin a block with
  485. IF <condition> THEN... and follow this with a bunch of lines to execute
  486. of the condition is true.  Then you can say ELSE and then a bunch of
  487. lines to execute if the condition is false, followed by END IF to
  488. terminate the block.  In PROZOL you can do the same thing with the CASE
  489. command.
  490.  
  491.         CASE EVAL A=1
  492.                 ...
  493.         ELSE
  494.                 ...
  495.         END CASE
  496.  
  497. CASE structures may be nested, however END CASE (or ENDCASE) will
  498. terminate all case conditions and continue executing, therefore,
  499. additional nested case loops can not be terminated with an END CASE.
  500. You must do something like this:
  501.  
  502.         CASE <condition>
  503.                 CASE <other condition
  504.         ELSE
  505.                 <if first AND second are not true>
  506.         END CASE
  507.  
  508. IF..ELSE..ENDIF blocks can be created as long as they are on the same line,
  509. such as
  510.  
  511.         IF A:PRINT "A is true":ELSE:PRINT "A is false"
  512.  
  513. Notice that there is no THEN keyword.  Also, ELSE is an expression by itself
  514. and must be parsed with colons, otherwise it will not execute correctly.  If
  515. you did not want to use colons to parse the components of IF..ELSE..ENDIF
  516. then you would have to write it backwards, like this:
  517.  
  518.         PRINT "A is false" ELSE PRINT "A is true" IF A
  519.  
  520. You can write block IF..ELSE..ENDIF statements inside subroutines, however,
  521. such as
  522.  
  523.         MYSUB {IF A THEN
  524.                 PRINT "A is true"
  525.               ELSE
  526.                 PRINT "A is false"
  527.               ENDIF
  528.               }
  529.  
  530. Since the rules for writing code inside a subroutine or function are slightly
  531. different from those governing ordinary line by line code.  Inside a
  532. subroutine that is blocked with curly braces, the code must be written as
  533. through each line was on the same line with each statement separated by
  534. colons.  More on this later.
  535.  
  536. As we saw before, GOTO can jump to any label in the current program.
  537. GOSUB will do the same thing, but a subsequent RETURN will jump back to
  538. the line immediately following the GOSUB which invoked it.  You can nest
  539. GOSUBs to 32 levels.
  540.  
  541. You can also create subroutines by placing the code to execute into a
  542. single variable.
  543.  
  544.         SET CLEARALL TO "CLS:COLOR 7,0:LOCATE 24,1"
  545.         CALL CLEARALL
  546.  
  547. By placing executable statements into a string variable you can call the
  548. string variable.  This is a little more versatile than you might think
  549. by using the FILE function.  FILE is a character function which returns
  550. the entire contents of a file name which follows it.  For example, a
  551. file which contains a small PROZOL program to set a number of color
  552. constants is included under the name COLORS.PRO.  You can load this file
  553. into a character variable like this:
  554.  
  555.         SET COLORS TO FILE "COLORS.PRO"
  556.  
  557. You can then execute this program as a subroutine like this:
  558.  
  559.         CALL COLORS
  560.  
  561. A file containing multiple lines that is executed with CALL FILE must be
  562. written as though each line in the file was actually a part of a single line
  563. separated by colons.
  564.  
  565. You can create functions which return values the same way using the EXIT
  566. command in the function.  EXIT will immediately terminate a CALLed
  567. subroutine leaving any specified parameters on the stack.  For instance
  568. if you created a string like this:
  569.  
  570.         SET X TO "EXIT 1"
  571.  
  572. And then you said
  573.  
  574.         PRINT CALL X
  575.  
  576. PROZOL would display
  577.  
  578.         1
  579.  
  580. on the screen, since 1 followed the EXIT command it was pushed onto the
  581. stack and returned as a parameter.  A more elaborate example would be
  582. something like this
  583.  
  584.         SET NUMINKEY TO "SET A TO INKEY:IF EVAL VAL A>0:EXIT A"
  585.  
  586. Then you could create a loop like this:
  587.  
  588.         UNTIL CALL NUMINKEY
  589.  
  590. This line would continue to iterate until you pressed a key with a
  591. numeric value (1 through 9).
  592.  
  593. SUBROUTINES AND FUNCTIONS
  594.  
  595. You can create subroutines and functions that do not require the CALL keyword
  596. to execute.  The way to do this is to surround the subroutine code in curly
  597. braces.  Here is an example:
  598.  
  599.         DAY {MID DATE 4,2}
  600.  
  601. If you were to include this line anywhere in the current program, then
  602.  
  603.         PRINT DAY
  604.  
  605. would print the current day of the month (like 15 if it was the 15th of the
  606. month).
  607.  
  608. Here is another example:
  609.  
  610.         MENU {  COLOR 7,0
  611.                 CLS
  612.                 TYPE "MENU.TYP"
  613.                 }
  614.  
  615. Then, in your code you could simply say
  616.  
  617.         MENU
  618.  
  619. and the subroutine would execute.  When you load and run a new program
  620. that does not contain this subroutine, it will no longer exist.
  621.  
  622. Well, now we have covered most of the fundamentals of PROZOL.  Now all
  623. you need to do is become familiar with all of the other commands and
  624. functions which make PROZOL a really useful language.  There are a wide
  625. range of very typical functions, like CHR, ASC, UCASE, LCASE, LEFT,
  626. RIGHT, LEN, INSTR, MID, TIME, DATE, VAL, etc, as well as many commands
  627. which do things with functions, variables and constant arguments, like
  628. PRINT, INPUT, CLS, LOCATE, RUN, GOTO, LET, IF, WHILE, UNTIL, GOSUB, etc.
  629.  
  630. There are also a wide range of specialized commands which do some very
  631. useful things.  If you wanted to begin transmitting a file with the
  632. XMODEM protocol, the XMODEM command would be used for this:
  633.  
  634.         INPUT "Enter the filename you want:",FI
  635.         CASE EXIST FI
  636.                 XMODEM OUT FI
  637.         ELSE
  638.                 PRINT "File does not exist"
  639.         END CASE
  640.  
  641. With a full understanding of the fundamental structure of the PROZOL
  642. language, you will be able to study the PROZOL command reference and
  643. learn how to incorporate each command or function into its proper
  644. context.  Since PROZOL programs work the same way on your local console
  645. as they will over the modem, you can learn a great deal by experimenting
  646. with each keyword, writing and running test programs, and debugging them
  647. locally.  Once you have several programs written that all seem to run
  648. together just fine on your local console, then you can invoke PROZOL with
  649. a com port parameter and allow users to dial in and run the very same
  650. programs with PROCOMM or QMODEM or any other ANSI compatible terminal
  651. program.
  652.  
  653.  
  654. Named procedures will also work at the immediate command prompt.  For instance,
  655. start Prozol (or reset) and type this:
  656.  
  657.         10 DAY { MID DATE 4,2 }
  658.  
  659. Then type this:
  660.  
  661.         PRINT DAY
  662.  
  663. Prozol would print the current day (like 15 if it is the 15th of the month)
  664. on the screen.
  665.  
  666. PROZOL PROGRAM STRUCTURE
  667. ========================
  668.  
  669.         GOTO label
  670.  
  671. A label can be any unique word at the beginning of a line.  For example,
  672.  
  673.         START
  674.         PRINT "hi there!"
  675.         GOTO START IF NOT LEN INKEY
  676.  
  677. Your label could also be a bit longer
  678.  
  679.         START.AT.THE.VERY.BEGINNING
  680.         PRINT "hi there!"
  681.         GOTO START IF NOT LEN INKEY
  682.  
  683. in order to jump to a label you must specify characters that can be found
  684. at the beginning of the line containing the label, but it does not have
  685. to be the entire label.  You cannot have any spaces or punctuation in a
  686. label.
  687.  
  688. Labels are not case sensitive.  You cannot use line numbers in a GOTO or
  689. GOSUB.
  690.  
  691.  
  692.         GOSUB label
  693.  
  694. This works just like GOTO except that a subsequent RETURN will come back to
  695. the line immediately following the GOSUB.  Any remainder to the line will
  696. be bypassed.
  697.  
  698.  
  699.         CALL string
  700.  
  701. CALL will invoke a line of code contained within a variable, a single line
  702. which starts with a label, or a disk file containing a program.
  703.  
  704.         SET A TO "PRINT 'hi there!'"
  705.         CALL A
  706.  
  707. This will print "hi there!" on the screen.  You can also call a line which
  708. starts with a label.
  709.  
  710.         CALL LINE XYZ
  711.         END
  712.  
  713.         XYZ PRINT "Hi there!"
  714.  
  715. This will also print "hi there!"
  716.  
  717.         CALL FILE "XYZ.SUB"
  718.  
  719. This will load XYZ.SUB into memory and execute lines of program code in it.
  720.  
  721. Another form of call is implied.  You do not have to use the CALL keyword
  722. when attempting to execute a line of code which starts with a label.  For
  723. instance, if you had a line somewhere in your program that went like this:
  724.  
  725.         MAINMENU  { COLOR 7,0:CLS:TYPE "MAINMENU.TYP":INPUT A }
  726.  
  727. Then anytime you wanted to execute the commands to show the main menu
  728. you could just say
  729.  
  730.         MAINMENU
  731.  
  732. which would be the same as
  733.  
  734.         CALL LINE MAINMENU
  735.  
  736. The same line above could return a value like a function.  All you have
  737. to do is leave the values you want to return at the end of the line, like
  738. this:
  739.  
  740.         MAINMENU { COLOR 7,0:CLS:TYPE "MAINMENU.TYP":INPUT A: A }
  741.  
  742. The you could say
  743.  
  744.         SET X TO MAINMENU
  745.  
  746. And the MAINMENU function would run and return the value in A, which the
  747. above statement would be assigning to the variable X.
  748.  
  749.  
  750. BLOCK STATEMENTS
  751. ================
  752.  
  753. You can create blocks of statements that behave just like they were on a
  754. single line, only they can be up to 32K in length.  You cannot enter
  755. block statements directly in the interpreter.  To use them you must edit
  756. your program with a text editor and then load and run the program.  A block
  757. statement is written like this:
  758.  
  759.         LABEL { program line
  760.                   program line
  761.                     program line
  762.                   program line
  763.                 program line } return value
  764.  
  765. For instance, a menu subroutine could be created that displays a specified
  766. menu and waits for input, returning the key value like this:
  767.  
  768.         SHOWMENU { SET MNU TO ?
  769.                    COLOR 7,0:CLS
  770.                    TYPE MNU
  771.                    PRINT:PRINT:INPUT "Please select --> ";X
  772.                    } X
  773.  
  774. Then you could display a menu contained in the file MAINMENU.TYP like this
  775.  
  776.         SET A TO SHOWMENU "MAINMENU.TYP"
  777.  
  778. Notice the first line of the SHOWMENU subroutine, SET MNU TO ?.  This means
  779. to use whatever has been passed as a parameter.  If many parameters are passed
  780. then each subsequent ? is used in place of a variable or argument to read
  781. the parameters from the stack.  ? is just a place holder and does nothing,
  782. hence, whatever is already on the argument stack is used in it's place.
  783. The subroutine displays the file with the TYPE command and then waits for
  784. input.  The input is pushed onto the stack as a return value, so SHOWMENU
  785. will return the keyed in response to the menu.
  786.  
  787.  
  788. LOOPS
  789. =====
  790.  
  791. Block statements can also be used for controlling loops.  As you have seen,
  792. WHILE, UNTIL and IF can only be used to affect the current line.  To iterate
  793. or conditionally execute a large block of items, you can block them.
  794.  
  795.         IF EVAL A=1: { do this
  796.                        do that
  797.                        do the other
  798.                        etcetera }
  799.  
  800.         {do this
  801.             do that
  802.                 do the other
  803.                     etcetera } UNTIL EVAL A>B
  804.  
  805.  
  806.         WHILE NOT LEN INKEY {do this
  807.                              do that
  808.                               do the other}
  809.  
  810.  
  811.  
  812.  
  813.  
  814. SPECIAL PROZOL COMMANDS
  815. =======================
  816.  
  817. PROZOL features a rich set of primative language essentials, but it also
  818. includes some powerful special commands which invoke complex BBS
  819. oriented subroutines.  These are described first.  After this section we
  820. will describe some of the more typical language features.
  821.  
  822. ANSI - Activates ANSI terminal emulation
  823.  
  824. ANSI turns on ANSI emulation.  This command is usually not necessay
  825. since ANSI is the default emulation.
  826.  
  827. ANSWER - ANSWER COMn: waits for an incoming call on com port n
  828.  
  829. The ANSWER command causes PROZOL to reset the modem and wait for an
  830. incoming call.  This command can be used instead of invoking PROZOL with
  831. a com port on the command line.
  832.  
  833. CHAT - invokes a 6-way chat system
  834.  
  835. CHAT must be followed by a user ID which is a unique string of 8
  836. characters or less.  CHAT places the user into global chat mode in which
  837. the user may converse in a color coded multi-node chat with other users.
  838. For example, CHAT "SYSOP" will place you in CHAT mode where you may
  839. engage in live chat with up to 6 other users who have also been placed
  840. into chat mode with the CHAT command.
  841.  
  842. CONFERENCE - invokes a conference message system
  843.  
  844. This command must be followed by a conference file name without a path.
  845. This command invokes an internal procedure which allows the user to
  846. search the specified conference file or add messages to it.
  847.  
  848. CONFIG - invokes the internal configuration routine
  849.  
  850. CONFIG erases the current configuration file and prompts you to create a
  851. new one.
  852.  
  853. CONNECT - opens a serial port and connects for terminal mode
  854.  
  855. This command must be followed by legitmate modem parameters, i,e,
  856. "COM1:2400,N,8,1".  This command has the effect of allowing a local user
  857. or remote caller to open a different serial port and begin interacting
  858. with it.
  859.  
  860. DISCONNECT - disconnects secondary serial port
  861.  
  862. This command closes the secondary serial port opened with CONNECT.  It
  863. does not log out the user who may be connected to a primary serial port.
  864.  
  865. DOOR - shells to a door program
  866.  
  867. Door shells to DOS and runs a door program specified as a string
  868. parameter.  For instance,
  869.  
  870.         DOOR "COMMAND.COM <COM1: >COM1:"
  871.  
  872. will run DOS redirected to the com port COM1:.  DOOR does not
  873. automatically redirect the command line to the com port.  In fact, DOOR
  874. differs from SHELL in that it actually closes the connection and reopens
  875. it after the door is completed.  You must create a door info file prior
  876. to invoking a commercial door program which requires it.
  877.  
  878. ECHO - sets character echo on or off
  879.  
  880. ECHO OFF supresses character output to the user.  This command might be
  881. useful for a subsequent INPUT which asks for a password, during which ou
  882. do not want to echo characters back to the user.  You can also use ECHO
  883. OFF to suppress database messages like "Not Found" during database
  884. searches.  ECHO ON will re-enable character output to the user.
  885.  
  886. EDITCOMMENT - edits an e-mail comment
  887.  
  888. EDITCOMMENT must be followed by a comment ID string of up to 20
  889. characters.  A comment ID string can be the user's name, ID number, or
  890. any other kind of category, like a conference topic, a record number, or
  891. some sort of other ID.  EDITCOMMENT will then allow the user to create
  892. and edit a message up to 9 lines long that can then be stored under the
  893. comment ID.  The GETCOMMENT command is used to retrieve and display all
  894. comments under that same ID.
  895.  
  896. GETCOMMENT - checks for e-mail and displays if exists
  897.  
  898. GETCOMMENT must be followed by a comment ID string of up to 20
  899. characters.  If any comments are found which were created with this ID
  900. they will be stacked and displayed one at a time to the user.  The user
  901. mey view the comments, kill them, or send a reply to the originator of
  902. the comment.
  903.  
  904. GETTAG - gets a tag number from a tag file
  905.  
  906. This command goes along with the TAG command, which appends a number to
  907. a TAG file.  If you wanted to know what the first TAG entry of a certain
  908. TAG file was, you could use the command
  909.  
  910.         PRINT GETTAG "TEST.TAG",1
  911.  
  912. to display it.  Tag files can be very useful for marking database record
  913. numbers. You could have a tag file which lists all database records that
  914. a user is interested in.  By creating a tag file, the user can then go
  915. and retrieve them at a later date.
  916.  
  917. GLOBAL - sets a global variable or returns the value of one
  918.  
  919. GLOBAL is actually not a good keyword to describe what GLOBAL does.
  920. GLOBAL variables are really not global in any sense, they are simply
  921. variable values that you can set and then view.  PROZOL uses some of them
  922. for internal purposes, for instance, GLOBAL 1 should always be the
  923. user's login name, 8 characters or less with no spaces or punctuation.
  924. GLOBAL 3 is always the name of the program currently running, and GLOBAL
  925. 4 is an ANSI color code for the color scheme of all menu commands.
  926.  
  927. There are a total of 32 global variables which can be defined by
  928.  
  929.         GLOBAL 1, "Hi!"
  930.  
  931. Or retrieved as
  932.  
  933.         PRINT GLOBAL 1
  934.  
  935. All of them except for 1,3 and 4 are undefined but reserved for future
  936. use.  For instance, a future version of PROZOL will store the current
  937. terminal type in GLOBAL 2, and the default file transfer protocol in
  938. GLOBAL 5.  No other global variables are defined, but do not use them as
  939. they may be reserved in the future.
  940.  
  941. GO - executes an interpreted program without quotes around the program name
  942.  
  943. If you want to run A PROZOL program you can say RUN "xxxx", with the
  944. program name in quotes.  You could also use the GO command and follow it
  945. by the program name without quotes.  OK, big deal, but wait.  At any input
  946. prompt a user may enter GO xxxxx instead of whatever normal input was
  947. expected.  PROZOL will completely abandon the current program in memory
  948. and run the requested program instead.  If the user is sitting at an
  949. animated ANSI menu instead of an input prompt, they may press control-G
  950. instead.  PROZOL will pop up a prompt window within which the user may
  951. enter a program name.  If the program, or the program with an ".PRO"
  952. extention does not exist in the current directory or in a directory
  953. called "\PRO\", then the current program will simply resume, otherwise
  954. the new program will be loaded and executed.  For instance, a user
  955. sitting at the main menu selection prompt may type "GO FILES" instead of
  956. making a selection and automatically run a program called "FILES.PRO"
  957. which may reside in the current directory or in a directory called \PRO\
  958. from the root of the current disk drive.
  959.  
  960. GOD - sets the value of the GOD variable
  961.  
  962. GOD ON or GOD OFF will set the GOD variable.  If GOD is ON then the user
  963. may execute any PROZOL command at any input line by preceeding the line with
  964. a slash character.  For instance, if GOD is on then you can drop to an
  965. PROZOL prompt by typing in /END at any input prompt.
  966.  
  967. MENU - displays a square box on the screen containing a menu
  968.  
  969. MENU displays an ANSI box containing items and then accepts user input
  970. in the last line of the box.  The XMENU function replaces menu and
  971. should be used instead.  See the description of XMENU for more
  972. information.
  973.  
  974. MENUCOLOR - sets the default color of menus
  975.  
  976. The XMENU command invokes an animated ANSI menu in which the user is
  977. presented with a square box full of options from which they may select
  978. using the arrow keys.  MENUCOLOR sets the color scheme of all subsequent
  979. MENU commands.  The argument of MENUCOLOR should be a quoted string
  980. containing ANSI color codes.  See the section entitled ANSI COLOR
  981. SYMBOLS for a complete list of valid ansi color codes that can be used
  982. as parameters for the MENUCOLOR command.
  983.  
  984. MORE - sets the number of lines for scrolling text files
  985.  
  986. The TYPE command will dump a file to the screen.  This file may contain
  987. lines of text. PROZOL variables, functions, and executable statements.
  988. MORE is used to set the number of lines to display before pausing with a
  989. -more- prompt and waiting for a key press before continuing.
  990.  
  991. OLM - sets OLM scanning on or off or sends an OLM message to another user
  992.  
  993. OLMs are On Line Messages that one user can send to another user.  If
  994. the other user is currently on line then the message will be displayed
  995. on the users's screen immediately.  If the other user is not on line
  996. then the OLM messages will be stacked and displayed the next time the
  997. user connects.  The proper syntax for sending OLM messages is
  998.  
  999.         OLM <username>,<message>
  1000.  
  1001. By default, OLM message checking is off.  To enable OLM message
  1002. reception, you must invoke an OLM ON statement.  To disable OLM checking
  1003. (desireable for faster program execution) you may say OLM OFF in a
  1004. program.
  1005.  
  1006. ONERROR - sets a string which contains a routine to execute on error
  1007.  
  1008.         ONERROR FILE "ERRORHAN.PRO"
  1009.         ON ERROR "PRINT 'An error has occurred!':LOGOUT"
  1010.         ON ERROR LINE ERRORHANDLER
  1011.  
  1012. The first example loads a file which contains a subroutine to execute if
  1013. any error occurs.  The second line sets the error handler to a literal
  1014. string of code to execute.  The third lines sets the error handler to a
  1015. line in the current program.  Even if a new program is loaded the original
  1016. line (or subroutine) will be remembered because it was loaded into a
  1017. special error handling area by the ONERROR command.
  1018.  
  1019. If an error occurs (like DISK FULL or OUT OF MEMORY) then the subroutine
  1020. will execute, otherwise an error message will be displayed and the user
  1021. will have to choose between retrying or aborting the program.  In a live
  1022. situation you should set the command prompt to automatically log the user
  1023. out to prevent accidentally allowing users full access to your computer at
  1024. the command prompt.  The variable ERROR will contain the error code and
  1025. error message. If ERROR is used in an arithmetic statement then only the
  1026. error code number will be returned.  If it is printed to the screen or
  1027. otherwise used as a string it will contain the error code and the literal
  1028. error message.
  1029.  
  1030.  
  1031. ONLOGOUT - sets a string which contains a routine to execute on logout
  1032.  
  1033.         ONLOGOUT FILE "ONLOGOUT.PRO"
  1034.         ONLOGOUT "PRINT 'Goodbye!'":LOGOUT
  1035.         ONLOGOUT LINE LOGOUTUSER
  1036.  
  1037. This works just the same as ONERROR.  Use ONLOGOUT to specify code to execute
  1038. when the user logs out, whether on purpose, due to an error, or due to a
  1039. keyboard timeout.
  1040.  
  1041. RESET - logs out the current user and resets the system
  1042.  
  1043. This is similar to the LOGOUT command exept it will not run the ONLOGOUT
  1044. routine specified.
  1045.  
  1046. RESTART - same as reset
  1047.  
  1048. SEND - transmits an argument to a secondary port opened with CONNECT
  1049.  
  1050. You can open a serial port which is different from the one the user connected
  1051. through and send characters to it.  SEND "ATZ" CHR 13 will sent a reset
  1052. command to an alternate modem.  The purpose of a command such as this is
  1053. to allow you to write bridge routines.  A user can call your system and
  1054. then dial into another system _from_ your system.  You can also program
  1055. your system to dial into another system while the user waits, retrieve some
  1056. information, hang up, and then display it for the user.
  1057.  
  1058. TAG - writes a tag value to a tag file
  1059.  
  1060.         TAG filename,number
  1061.  
  1062. This appends a long integer number to a tag file, used for marking records
  1063. in a database or any other purpose.
  1064.  
  1065. TAGGED - returns the number of items in a tag file
  1066.  
  1067.         PRINT TAGGED "TAGFILE.TAG"
  1068.  
  1069. Will print the number of tagged entries in the file "TAGFILE.TAG"
  1070.  
  1071. TIMEOUT - sets the user timeout value in minutes
  1072.  
  1073. By default, a user can remain connected for 3600 minutes before the system
  1074. will force a logout.  You can set this timeout value to anything as low
  1075. as 1 minute.
  1076.  
  1077. TTY - disables ANSI terminal emulation
  1078.  
  1079. By default, ANSI emulation is enabled.  The TTY command will cause all
  1080. subsequent ANSI terminal control codes to be replaced with a space, carriage
  1081. return, or asterisk where appropriate.
  1082.  
  1083. TYPE - dumps a file to the screen, processing metastatements and functions
  1084.  
  1085. This is an extremely powerful and versatile command.  TYPE followed by a
  1086. filename will read and dump the contents of the file to the screen.  You
  1087. can use TYPE to display menus, help screens, bulletins or other bits of
  1088. text.
  1089.  
  1090. While the file is being TYPEd to the screen it is scanned for special
  1091. symbols, functions, variables, and metacommands.  See the next section for
  1092. a full description of these items.
  1093.  
  1094. WINDOW - displays a box on the screen containing a title
  1095.  
  1096.         WINDOW 5,10,5,70,"Welcome to the system!"
  1097.  
  1098. This command will display a box on the screen at the coordinates specified
  1099. with the title centered inside it.  The coordinates indicate the dimensions
  1100. of the inside of the box.
  1101.  
  1102. XMENU - displays a scroll-bar menu on the screen
  1103.  
  1104.         XMENU 10,30,20,50."Main Menu"
  1105.  
  1106. XMENU displays a box on the screen with the dimensions specified.  The title
  1107. is centered inside the first line of the box.  Previously listed ITEMs are
  1108. then displayed inside the box and the user is prompted to scroll through
  1109. the items.  When the user presses ENTER the menu is exited and XMENU returns
  1110. the value of the item selected.
  1111.  
  1112.         ITEM 1,"Files Area"
  1113.         ITEM 2,"Messages"
  1114.         ITEM 3,"LOGOUT"
  1115.         SET A TO XMENU 10,10,15,20;"Options"
  1116.  
  1117. The ITEM command sets a menu item for an upcoming MENU or XMENU command.
  1118. You must use XMENU as a function which returns a value from 0 to the number
  1119. of items specified.  The user may scroll up and down with a highlight bar
  1120. through the menu items, or enter a number (1-?) which corresponds to a menu
  1121. item.  When the user takes this action the menu is exited and returns the
  1122. number of the menu item selected.  The user may press X and the function
  1123. will return 0.
  1124.  
  1125. Also, at this point the user does not have access to an input prompt, so
  1126. the user is not able to type GO followed by a program to run.  Inside the
  1127. XMENU the user may press CTRL-G and a GO prompt will pop up on top of the
  1128. menu box.  The user may then type in the name of a program to run.
  1129.  
  1130. XMODEM - transfers a file using the XMODEM protocol
  1131.  
  1132.         XMODEM IN filename
  1133.         XMODEM OUT filename
  1134.  
  1135. This command transfers a file using an internal XMODEM protocol. You may
  1136. also shell to an external protocol like DSZ, KERMIT or JMODEM with the
  1137. DOOR command.
  1138.  
  1139.  
  1140.  
  1141. TEXT OUTPUT SYMBOLS
  1142. ===================
  1143.  
  1144.         It may be desireable to embed variables and database field names
  1145.         in text that is being output to the screen with the TYPE command,
  1146.         or with PRINT FILE.  Any single word enclosed in greater than-less
  1147.         than brackets <> will be converted to a variable and the content
  1148.         of the variable will be displayed instead, sort of like a mail
  1149.         merge feature.   For instance, you can have a letter that contains
  1150.         fields from a database:
  1151.  
  1152.  
  1153.         ======================
  1154.         <NAME>
  1155.         <ADDRESS>
  1156.         <CITY>, <STATE>  <ZIP>
  1157.  
  1158.         Dear <SALUT>,
  1159.  
  1160.         Blah Blah Blah
  1161.  
  1162.         Sincerely, <USERNAME>
  1163.         ======================
  1164.  
  1165.  
  1166.         When you TYPE this file to the screen, the database fields and
  1167.         variable USERNAME will be inserted in the proper places.
  1168.  
  1169.         Any string output may contain symbols to represent ANSI color or
  1170.         control codes.  Symbols can also perform program commands or
  1171.         functions.  A good reason for this capability is to insert calculations
  1172.         or process data in text files which are being output to the screen.
  1173.         Any text output which contains an ansi symbol, function, memory
  1174.         variable or database field according to the following format will
  1175.         be processed accordingly.
  1176.  
  1177.         Variables may also contain the names of subroutines or functions to
  1178.         execute, like <DAY> or <JULIANDATE> if defined.
  1179.  
  1180.         Symbols    - ^x  where x is a color code.
  1181.  
  1182.         ^0 - all attributes off
  1183.         ^I - inverse text
  1184.         ^F - flashing
  1185.         ^B - bold text
  1186.         ^P - print on (televideo)
  1187.         ^p - print off (televideo)
  1188.  
  1189.  
  1190.         Foreground colors, text
  1191.  
  1192.         ^n - normal text (White)
  1193.         ^r - red
  1194.         ^g - green
  1195.         ^y - yellow
  1196.         ^b - blue
  1197.         ^m - magenta
  1198.         ^c - cyan
  1199.         ^w - white
  1200.  
  1201.         Background colors
  1202.  
  1203.         ^N - normal background (black)
  1204.         ^R - red
  1205.         ^G - green
  1206.         ^Y - yellow
  1207.         ^U - blue
  1208.         ^M - magenta
  1209.         ^C - cyan
  1210.         ^W - white
  1211.  
  1212.         For instance, PRINT "^B^F^r^WHELLO!" would print the word HELLO!
  1213.         in ^Bold, ^Flashing, ^red text on a ^White background.  You can
  1214.         place these codes into files that are displayed on the screen with
  1215.         the TYPE command.
  1216.  
  1217.  
  1218.         Functions  - @FUNCTION(arguments)
  1219.  
  1220.         Functions are also embedded within text that is output with PRINT
  1221.         commands or by TYPEing a file to the screen.  Functions can
  1222.         process data, perform size fixing, rounding, etc.  Remember, these
  1223.         functions are not a part of your regular program, but a "hot" function
  1224.         which is calculated at the exact moment it is output to the screen.
  1225.         Instead of the literal function, the result (or blank) will be
  1226.         printed instead.  All variables must be enclosed in <brackets> or
  1227.         they will be taken literally.
  1228.  
  1229.         @OR(x,y)
  1230.         @AND(x,y)
  1231.         @NOT(x)
  1232.         Return logical OR, AND or NOT of the arguments
  1233.  
  1234.         @LOOKUP(file,searchstring)
  1235.         Scans the file for a line which begins with the search string and
  1236.         then outputs the entire line on the screen.  Good for converting
  1237.         coded items to a verbose listing
  1238.  
  1239.         @CWAIT()
  1240.         Pauses and waits for a keypress
  1241.  
  1242.         @USING(formatstring,var)
  1243.         Formats a numeric or string variable for output
  1244.  
  1245.         @FIX(var,length)
  1246.         Fixes the length of a variable, lengthens or shortens it and outputs
  1247.         the fixed length value.  The variable is not changed.
  1248.  
  1249.         @LOGOUT()
  1250.         Immediately logs out the user
  1251.  
  1252.         @INPUT(prompt,var)
  1253.         Inputs a line of text to the specified variable.  Do not bracket the
  1254.         variable
  1255.  
  1256.         @FOUND()
  1257.         Returns true if last database search was successful
  1258.  
  1259.         @PARM()
  1260.         returns the current modem parameters
  1261.  
  1262.         @PORT()
  1263.         returns the current serial port number
  1264.  
  1265.         @CRC(x)
  1266.         returns a CRC of x
  1267.  
  1268.         @EXIST(filename)
  1269.         returns true if the file exists
  1270.  
  1271.         @INKEY()
  1272.         returns a waiting keypress or nul
  1273.  
  1274.         @LEN(string)
  1275.         returns the length of the argument
  1276.  
  1277.         @UPPER(string), @UCASE(string)
  1278.         returns the upper case of the argument
  1279.  
  1280.         @LOWER(string), @LCASE(string)
  1281.         returns the lower case of the argument
  1282.  
  1283.         @INSTR(string,string), @SUBSTR(string,string)
  1284.         returns the position of a string within a substring
  1285.  
  1286.         @LEFT(string,n)
  1287.         returns the left most n characters
  1288.  
  1289.         @RIGHT(string,n)
  1290.         returns the right most n characters
  1291.  
  1292.         @CHR(x)
  1293.         returns the char of ascii code x
  1294.  
  1295.         @ASC(string)
  1296.         returns the ascii value of a character
  1297.  
  1298.         @ENVIRON(envar)
  1299.         returns the contents of an environment variable
  1300.  
  1301.         @DUP(string,count)
  1302.         returns a duplicated string a specified number of times
  1303.  
  1304.         @RTRIM(string)
  1305.         returns a right trimmed string
  1306.  
  1307.         @LTRIM(string)
  1308.         returns a left trimmed string
  1309.  
  1310.         @CALC(expression)
  1311.         returns the results of an arithmetic calculation
  1312.  
  1313.         @GETFILE(filename)
  1314.         returns the entire contents of a file
  1315.  
  1316.         @VAL(var)
  1317.         returns the value of a variable
  1318.  
  1319.         @EOF()
  1320.         returns true if the current database record is the last one
  1321.  
  1322.         @COUNT()
  1323.         returns the number of records in a database
  1324.  
  1325.         @RECNUM(),@RECNO()
  1326.         returns the current record number
  1327.  
  1328.         @LOCATE(x,y)
  1329.         returns an ANSI code to position the cursor at x,y
  1330.  
  1331.         @SGR(code;code;code...)
  1332.         returns an ANSI code to set graphics rendition codes
  1333.  
  1334.         @CLS()
  1335.         returns an ANSI code to clear the screen
  1336.  
  1337.         @TIMEOUT()
  1338.         returns the number of minutes a user has left
  1339.  
  1340.         @GLOBAL(n)
  1341.         returns the value of a global variable
  1342.  
  1343.         @CUU()
  1344.         returns and ANSI code for CURSOR UP
  1345.  
  1346.         @CUD() - cursor down
  1347.  
  1348.         @CUF() - cursor forward
  1349.  
  1350.         @CUB() - cursor back
  1351.  
  1352.         @SCP() - save cursor position
  1353.  
  1354.         @RCP() - restore cursor position
  1355.  
  1356.         @EOL() - erase to end of line
  1357.  
  1358.         @TIME()
  1359.         returns the current time
  1360.  
  1361.         @DATE()
  1362.         returns the current date
  1363.  
  1364.         @GOD()
  1365.         returns the value of the GOD variable
  1366.  
  1367.         @RND(n), @RANDOM(n)
  1368.         returns a random number between 1 and n
  1369.  
  1370.         @BAUD()
  1371.         returns the current BAUD rate
  1372.  
  1373.         @DOS()
  1374.         returns the current drive and directory
  1375.  
  1376.  
  1377.  
  1378.  
  1379. ALL PROZOL KEYWORDS REFERENCE
  1380. =============================
  1381.  
  1382. ABS - function to return the absolute value of an argument
  1383.  
  1384.         PRINT ABS CALC -1
  1385.  
  1386. would print 1 on the screen
  1387.  
  1388. AND - logical operator returns true if X AND X are true
  1389.  
  1390.         IF A AND B:PRINT "Both are true"
  1391.  
  1392. ANSI - Activates ANSI terminal emulation
  1393.  
  1394. ANSI is active by default, but may be disabled with the TTY command.  ANSI
  1395. restores ANSI terminal emulation.  When the TTY command is executed, all
  1396. ANSI control codes are supressed or replaced with a simple carriage return
  1397. and MENU, XMENU, and WINDOW commands operate without ANSI screen drawing
  1398. facilities.
  1399.  
  1400. ANSWER - ANSWER COMn: waits for an incoming call on com port n
  1401.  
  1402. Running PROZOL with a com port parameter will automatically start up PROZOL
  1403. to wait for an incoming call, however the ANSWER COMn: command will do the
  1404. same thing from within a program.  If the modem is currently connected it
  1405. will be reset.
  1406.  
  1407. APPEND - user edits a blank record which is appended to the current database
  1408.  
  1409. Append will display the current database screen format and allow the user
  1410. to create a new record.
  1411.  
  1412. ASC,ASCII - function to return the ASCII code of a character argument
  1413.  
  1414.         PRINT ASC 65
  1415.  
  1416. Will print A on the screen
  1417.  
  1418. ASK - debugging command displays all variables currently in memory
  1419.  
  1420. ASK is used for debugging programs.  When you type in ASK at the command
  1421. prompt, all currently defined memory variables will be display.  ASK does
  1422. not display currenly database fields.
  1423.  
  1424. AUTOEDIT - Create variables appropriate for a mailing label and mail merge
  1425.  
  1426. (This is undefined at the time of this writing.  See the README file
  1427. for instructions on how to use AUTOEDIT in the current version.)
  1428.  
  1429. Basically, suppose you have several fields in your database that look like
  1430. this:
  1431.  
  1432.         SMITH JOHN X & MARY Q
  1433.         123 ANYWHERE ST
  1434.         SOMEWHERE ST 12345
  1435.  
  1436. You can use AUTOEDIT to create a set of new variables that look like this:
  1437.  
  1438.         John and Mary Smith
  1439.         123 Anywhere St.
  1440.         Somewhere, ST  12345
  1441.  
  1442. As well as
  1443.  
  1444.         Mr & Mrs. Smith
  1445.         John and Mary
  1446.         John
  1447.         Smith
  1448.         Mary
  1449.         Smith
  1450.         Mr & Mrs. John Smith
  1451.  
  1452. AUTOEDIT not only creates a proper address, it also creates several differnt
  1453. salutations based on pretty sophisticated name, gender, and name pattern
  1454. recognition algorithms.  At the time of this writing the AUTOEDIT feature
  1455. is not year complete.  You must refer to the README file for instructions
  1456. on how to use it.
  1457.  
  1458. BOTTOM,LAST - database command jumps to the end of the database
  1459.  
  1460. CALC,EVAL,WHAT,DOES - functions return arithmetic solution of parameters
  1461.  
  1462. Any arithmetic expression must be preceded by one of these keywords.  For
  1463. instance,
  1464.  
  1465.         PRINT 1+2+3
  1466.  
  1467. Will print 1+2+3 on the screen.  In order to print the result of 1+2+3
  1468. arithmetically, you must say
  1469.  
  1470.         PRINT CALC 1+2+3
  1471.  
  1472. Because of the parsing technique used, PROZOL does not assume that 1+2+3 is
  1473. meant to be evaluated.  The same goes for testing two numeric items.  For
  1474. example,
  1475.  
  1476.         PRINT A>B
  1477.  
  1478. Will print A>B.  You must use
  1479.  
  1480.         PRINT CALC A>B
  1481.  
  1482. or
  1483.         PRINT EVAL A>B
  1484.  
  1485. To display true or false (-1 or 0) or to use A>B in an expression.
  1486.  
  1487. or use WHAT or DOES.  All four keywords do the same thing.  You can use them
  1488. as you see fit for readability.
  1489.  
  1490. CALL - function executes a variable which contains an interpreted subroutine
  1491.  
  1492. CALL can be used to invoke a subroutine or function which is contained in
  1493. a variable.  You can also call the contents of a FILE or LINE with CALL FILE
  1494. or CALL LINE followed by the filename or line label.
  1495.  
  1496. CAPS - returns a string with all words capitalized
  1497.  
  1498. For example, if A was equal to "ERIK LEE OLSON" then the command
  1499.  
  1500.         PRINT CAPS A
  1501.  
  1502. Would print "Erik Lee Olson" on the screen.  CAPS is a function that will
  1503. take a string argument and return it with all words in lower case and the
  1504. first character of each work in upper case.  Use this in conjunction with
  1505. FLIP. FLIP will take the first word of a string argument and return the
  1506. string argument with the first word placed at the end.  FLIP and CAPS
  1507. are ideal for taking a capitalized name with the last name first and
  1508. flipping it around to be presentable on a mailing label.  See also the
  1509. entry for AUTOEDIT, which is an extremely powerful command.
  1510.  
  1511. CASE - beginning of a block CASE ... ELSE ... END CASE structure
  1512.  
  1513. CASE is used instead of IF..ELSE..ENDIF blocks outside of a subroutine.
  1514. CASE cannot be used inside a subroutine.
  1515.  
  1516. CD,CHDIR - command to change directory
  1517.  
  1518. CD or CHDIR must be followed by the directory name in quotes
  1519.  
  1520. CHAT - invokes a 6-way chat system
  1521.  
  1522.         CHAT "ERIK"
  1523.  
  1524. Will place the user into chat mode under the name "ERIK".  Up to 6 users
  1525. may chat at a time.
  1526.  
  1527. CHR - function to return the character value of an ASCII code
  1528.  
  1529.         PRINT CHR 65
  1530.  
  1531. will print "A" on the screen
  1532.  
  1533. CLEAR - clears all variables or erases the specified variable
  1534.  
  1535. Clear wipes all memory variables.  It has no effect on database fields.
  1536.  
  1537. CLOSE - close a file opened for sequential read/write
  1538.  
  1539. CLOSE closes a file opened with OPEN
  1540.  
  1541. CLS - clear the screen
  1542.  
  1543. CLS outputs a control code to clear the screen on ANSI, VT and Televideo
  1544. terminals
  1545.  
  1546. COL - function returns the current cursor column position
  1547.  
  1548. This applies only to users with ANSI terminal emulation.  COL is similar to
  1549. the BASIC POS function.
  1550.  
  1551. COLOR - set foreground and background colors
  1552.  
  1553. This applies only to users with ANSI terminal emulation.  COLOR outputs an
  1554. ANSI stream to set the user's screen color to a foreground and background
  1555. setting.
  1556.  
  1557. COMMON - set variables which are common to all nodes
  1558.  
  1559.         COMMON VAR,"Value"
  1560.  
  1561. This command sets the value of a common variable which can be seen by any
  1562. node on a network (or machine task).  As long as the variable has not already
  1563. been assigned as a local variable, PROZOL will scan a common variable file
  1564. for the value of any variable that is referenced in a program.
  1565.  
  1566. CONFERENCE - invokes a conference message system
  1567.  
  1568.         CONFERENCE conferencename
  1569.  
  1570. This will invoke a procedure which allows users to scan, view, edit or add
  1571. to a message conference specified by <conferencename>.  In order to use this
  1572. command you must have a directory on the current drive called \CONF which
  1573. is used to store pointers for each user that accesses a conference.  These
  1574. pointers must be maintained to allow users to re-enter conferences at "last
  1575. read" messages.
  1576.  
  1577. CONFIG - invokes the internal configuration routine
  1578.  
  1579. See the very beginning of this document for a very graphic description of
  1580. what will happen if you enter this command.
  1581.  
  1582. CONNECT - opens a serial port and connects for terminal mode
  1583.  
  1584. Used with SEND and DISCONNECT.  CONNECT activates an alternate serial port
  1585. for transmitting and receiving data through another modem while the user
  1586. is connected.
  1587.  
  1588. COUNT - database function returns the number of records in a database
  1589.  
  1590.         PRINT COUNT
  1591.  
  1592. Will print the number of records in a database opened with the USE command.
  1593.  
  1594. CR - function returns a carriage return string
  1595.  
  1596.         PRINT CR CR CR CR
  1597.  
  1598. Will print 4 carriage returns.
  1599.  
  1600. CREATEFORMAT - invokes a routine to create a screen edit format
  1601.  
  1602.         CREATEFORMAT filename
  1603.  
  1604. this command fires up an internal routine which you can use to move fields
  1605. around on the screen to create a screen format file.  A better alternative
  1606. is to use the FIELD command to create screen fields for input.
  1607.  
  1608. CREATEINDEX - creates in index on a specific database field
  1609.  
  1610.         CREATEINDEX field
  1611.         CREATEINDEX field,filename
  1612.  
  1613. This command will create a btree index based on the field specified.  If no
  1614. filename argument is given the the file will be the same name as the field
  1615. with a .BTX extention.
  1616.  
  1617. CWAIT - pauses and waits for a keystroke
  1618.  
  1619. This is very simple.  if you want to pause and wait for the user to hit
  1620. any key just say CWAIT.
  1621.  
  1622. DATE - function returns the current date
  1623.  
  1624. This function returns the current system date in MM-DD-YYYY format.
  1625.  
  1626. DBEND - database function returns true if the current record is the last one
  1627.  
  1628. DECR - decrements a numeric veriable argument
  1629.  
  1630. DEL - deletes a disk file
  1631.  
  1632. DEL will also remove a subdirectory if it is empty.  No error will be
  1633. generated if DEL is not successful.
  1634.  
  1635. DELAY - delays program execution for specified number of seconds
  1636.  
  1637.         DELAY 4
  1638.  
  1639. Will delay for 4 seconds.  Any keys entered during a delay will be queued.
  1640.  
  1641. DELIMITED - database function returns comma delimited form of the database
  1642.  
  1643. This is a neat function.  DELIMITED returns a large string containing the
  1644. entire current database record in a comma delimited ASCII form.
  1645.  
  1646. DISCONNECT - disconnects secondary serial port
  1647.  
  1648. If a secondary port had been opened with CONNECT, DISCONNECT will close it.
  1649.  
  1650. DOOR - shells to a door program
  1651.  
  1652. The difference between door and shell is that DOOR closes the current com
  1653. port and leaves DTR high while shelling to another program.  When the shell
  1654. is completed the port will be reopened and normal user interaction will
  1655. resume.  You can create a DOORINFO.SYS or other file with OPEN and WRITE
  1656. prior to executing a DOOR command.
  1657.  
  1658. ECHO - sets character echo on or off
  1659.  
  1660. The obvious use for this command is during input of a password:
  1661.  
  1662.         PROMPT "Enter password:":ECHO OFF:INPUT pw:ECHO ON
  1663.  
  1664. However another good use for this is to supress the output of a "not found"
  1665. message during a database search when the success or failure of the search
  1666. does not need to be known, specifically when searching for a match in a
  1667. login database.  If you ask the user to enter a login name, then search the
  1668. database for a record which contains the login name, you may not want the
  1669. message "not found" to dislay on the screen.
  1670.  
  1671. EDIT - edits the current database record
  1672.  
  1673. Using the current screen format, or an input format specified with FIELD
  1674. statements, EDIT will allow the user to edit the current database record
  1675.  
  1676. EDITCOMMENT - edits an e-mail comment
  1677.  
  1678. This command will invoke a 9 line editor which allows the user to create a
  1679. commant.  The syntax for this command must supply a comment ID.  For example,
  1680.  
  1681.         EDITCOMMENT "ERIK"
  1682.  
  1683. Will then allow the user to edit a 9 line comment that is labeled "ERIK".
  1684. A subsequent GETCOMMENT "ERIK" will retrieve all comments edited under this
  1685. ID.  This command can be used to personal messages or for attaching
  1686. text comments to a specific database record.
  1687.  
  1688. ELSE - use in block CASE..ELSE..END CASE structures
  1689.  
  1690. ELSE can occur in the main program as a logical control keyword for CASE
  1691. structures, or on a single line for IF..ENDIF structures.  Inside a
  1692. subroutine or function ELSE can be used on a line by itself in IF..ELSE..
  1693. ENDIF structures.
  1694.  
  1695. END - ends the current program and returns to a command prompt
  1696.  
  1697. The current program will end and display the PROZOL command prompt.  If the
  1698. command prompt is set to logout the user then the user will be logged out
  1699. at this point.
  1700.  
  1701. ENDTYPE - ends a file which is being typed to the screen
  1702.  
  1703. This command can only be seen as a metacommand from within a file that
  1704. is being TYPEd to the screen.
  1705.  
  1706.         $ENDTYPE
  1707.  
  1708. Will stop the file from being TYPEd to the screen.
  1709.  
  1710. EQUALS,SAME - function returns true if two strings are the same
  1711.  
  1712. This statement will return true if two string arguments are the same.  Use
  1713. this function if IF, CASE, WHILE or UNTIL statements to test the equality of
  1714. two string arguments.
  1715.  
  1716.         PRINT "They match!" IF SAME A,B
  1717.  
  1718. EXECUTE - runs a new EXE program
  1719.  
  1720. This command completely terminates PROZOL and executes another DOS program.
  1721. This is not a SHELL.
  1722.  
  1723. EXIST - function returns true if filename argument exists
  1724.  
  1725. This is a function which returns true if a filename argument exists
  1726.  
  1727. EXIT - exits a CALL subroutine
  1728.  
  1729. EXIT will immediately abort a subroutine and resume program execution to
  1730. the statement immediately following a CALL command or an implied call.  EXIT
  1731. will also abort a line.  You may follow EXIT with parameters to be returned
  1732. to the calling expression.
  1733.  
  1734. FALSE, OFF, NO - returns 0
  1735.  
  1736. FIELD
  1737.  
  1738. FIELD by itself clears all defined screen data entry fields.  FIELD followed
  1739. by parameters defines a screen data entry field.
  1740.  
  1741.         FIELD n, "var", length, row, column, [foreground,background]
  1742.  
  1743. n is the number of the data entry field on the screen in the order it will
  1744. be accepted.  "var" contains the name of the memory variable or database
  1745. field that the entered data will display and be edited to.  Length is the
  1746. length of the input field on the screen.  Row and column are the position
  1747. to place the field on the screen.  The default color for fields is black
  1748. on white, or inverse.  You may specify an optional color scheme for an
  1749. input field.  Defined input fields are not displayed until an INPUT FIELDS
  1750. command is issued.  At that point, all defined fields are displayed on the
  1751. screen and the user is prompted to fill in the values of all of the fields.
  1752.  
  1753.  
  1754. FIELDS
  1755.  
  1756. This keyword is used as an argument to INPUT.  INPUT requires an optional
  1757. prompt and a variable to accept the input at the current cursor position.
  1758. INPUT FIELDS displays all defined fields (defined with the FIELD statement)
  1759. on the screen and waits for the user to provide input for all of them.
  1760.  
  1761. FILE - function returns the entire contents of specified file
  1762.  
  1763. FILE is a function which returns the content of an entire file.  For example
  1764.  
  1765.         PRINT FILE "\AUTOEXEC.BAT"
  1766.  
  1767. Would print your AUTOEXEC.BAT file on the screen.
  1768.  
  1769.         SET A TO FILE "TEST"
  1770.  
  1771. Would load the contents of a file called "TEST" into the variable A
  1772.  
  1773.         CALL FILE "SUB.PRO"
  1774.  
  1775. Would load an execute the contents of the file "SUB.PRO"
  1776.  
  1777. FILES - prints the current directory or specified path or wildcards
  1778.  
  1779. FILES will display all files in the current directory on the screen in four
  1780. columns.  You may supply a path or wildcard specification.
  1781.  
  1782.         FILES "*.PRO"
  1783.  
  1784. Will print all program files in the current directory on the screen.
  1785.  
  1786. FIND - searches for a matching record in the database
  1787.  
  1788. FIND will search the current index for a matching record.  If no index
  1789. has been set (with the INDEX command) then the entire database will be
  1790. scanned for a matching string from beginning to end.
  1791.  
  1792. FORMAT - sets the current screen format for database editing and viewing
  1793.  
  1794.         FORMAT filename
  1795.  
  1796. This can be used instead of FIELD to set a screen input format.  The
  1797. data entry fields must have been defined with the CREATEFORMAT command.
  1798.  
  1799. FLIP - move the first word in a string argument to the end
  1800.  
  1801.         SET X TO FLIP Z
  1802.  
  1803. If Z contained the string "OLSON ERIK L" then FLIP would return the string
  1804. "ERIK L OLSON".  Flip takes the first word of a string argument and places
  1805. it at the end.
  1806.  
  1807. FREEFILE - returns the next free file buffer number
  1808.  
  1809. This works just like the BASIC FREEFILE command, which returns a free file
  1810. handle number for use with the OPEN statement.
  1811.  
  1812. GET - gets a specific record in a database
  1813.  
  1814.         GET 1
  1815.  
  1816. Will load the first record in a database
  1817.  
  1818. GETCOMMENT - checks for e-mail and displays if exists
  1819.  
  1820. This command will run an internal routine that displays all comment records
  1821. filed under a certain name.  For example,
  1822.  
  1823.         GETCOMMENT "ERIK"
  1824.  
  1825. will display a stack of all messages posted under the name "ERIK" with the
  1826. EDITCOMMENT command.  If no messages exist for the specified ID then this
  1827. command will display "no mail for ERIK" on the screen.
  1828.  
  1829. GETTAG - gets a tag number from a tag file
  1830.  
  1831. For use with the TAG command.  TAGGED returns the number of records that have
  1832. been tagged in a database.
  1833.  
  1834.         GETTAG filename,number
  1835.  
  1836. uwill return the contents of a tag figure.  For example, if you have used
  1837. TAG to tag 100 records in a database, then
  1838.  
  1839.         GETTAG "tagfile",50
  1840.  
  1841. will return the 50th tagged record in the file "tagfile".
  1842.  
  1843. GLOBAL - sets a global variable or returns the value of one
  1844.  
  1845. GLOBAL variables are not really global.  The keyword is a throwback to old
  1846. PROZOL.  There are 32 GLOBAL variables which can be defined, GLOBAL 1 through
  1847. GLOBAL 32.  This is just an array for storing values that are not erased
  1848. with the CLEAR command.  Only three GLOBAL variables have been defined.  You
  1849. may use the rest of them for your own purposes.
  1850.  
  1851. GLOBAL 1 must contain the name of the current user.  This should be 8 letters
  1852. or less with no spaces or punctuation, a valid filename with no extention.
  1853.  
  1854. GLOBAL 3 contains the name of the currenltly running program
  1855.  
  1856. GLOBAL 4 contains the value of the screen color codes specified with the
  1857. MENUCOLOR command.
  1858.  
  1859. GO - executes an interpreted program without quotes around the program name
  1860.  
  1861. GO works just like RUN, except the name of the program to run is not
  1862. enclosed in quotes.  GO is unique because any input line that begine with
  1863. the word GO followed by a space will be executed as a literal command.
  1864.  
  1865. GOD - sets the value of the GOD variable
  1866.  
  1867. If you say GOD 1 or GOD TRUE then the user will be able to execute any
  1868. PROZOL command at any input prompt by simply preceding the input line with
  1869. a slash character "/".  This would allow a system operator full access to
  1870. the PROZOL command line by simply typing /END at any command prompt.
  1871.  
  1872. GOSUB - jumps to a label subroutine in a program which ends with RETURN
  1873.  
  1874.         GOSUB label
  1875.  
  1876. Execution will jump the the labelled line specified an execution will
  1877. resume at the line following the GOSUB line when the command RETURN is
  1878. encountered.
  1879.  
  1880. GOTO - jumps to a label in a program
  1881.  
  1882.         GOTO label
  1883.  
  1884. Will jump to any line in the program which begins with the literal text
  1885. of the specified label
  1886.  
  1887. HOME - clears the screen and resets the current color to low white on black
  1888.  
  1889. This is essentially the same as CLS except that it resets the current color
  1890. scheme (in ANSI) to normal (white on black).
  1891.  
  1892. IF - conditionally executes the remainder of a program line
  1893.  
  1894.         IF condition : statements... [: ELSE : statements ... : ENDIF : ...
  1895.  
  1896.         or
  1897.  
  1898.         procedure {
  1899.                         statements
  1900.                         IF condition
  1901.                                 statements
  1902.                         ELSE
  1903.                                 statements
  1904.                         ENDIF
  1905.                         statements } [return value]
  1906.  
  1907. IF followed by any condition will continue to execute statements on the
  1908. same line if the condition is true.  A condition can be a single value
  1909. expression like LEN or VAL, or can be an arithmetic expression like
  1910. EVAL A>B or CALC A=0 (EVAL and CALC do the same thing) or it can be a
  1911. string equality test, such as IF SAME string,string or IF NOT SAME string,
  1912. string.  The IF expression must be followed by a colon.  There is no
  1913. THEN keyword in PROZOL.
  1914.  
  1915. A multi-line IF..ELSE..ENDIF statement may occur within a subroutine or
  1916. function procedure.  IF statements can be nested, but ELSE and ENDIF cannot.
  1917. In other words, a nested IF expression can only be written like this:
  1918.  
  1919.         IF condition
  1920.                 statements
  1921.                 IF condition
  1922.                         statements
  1923.                                 IF condition
  1924.                                         statements
  1925.                                 ELSE
  1926.                                         statements
  1927.                                 ENDIF
  1928.  
  1929. The same rule applies to single line IF..ELSE..ENDIF statements.  Another
  1930. important thing to not is that while ENDCASE and END CASE mean the same
  1931. thing, ENDIF must be a single word.  END IF is actually two keywords,
  1932. END and IF.
  1933.  
  1934. INCR - increments a numeric variable argument
  1935.  
  1936. INDEX - sets the current database index
  1937.  
  1938.         INDEX fieldname [,filename]
  1939.  
  1940. The index must have been created with CREATEINDEX.  INDEX sets a Btree index
  1941. which relates to the current database.  A database must be open in order to
  1942. set an index.  The index is automatically updated if records are changed or
  1943. new records are added.  If the filename is omitted then it will be assumed
  1944. to be the same as the fieldname with a .BTX extension.
  1945.  
  1946. To search an index, use the FIND string command.  Once a position in the
  1947. index has been set with FIND, then NEXT, PREV (or PREVIOUS), SKIP n, TOP and
  1948. BOTTOM (or FIRST and LAST) will move around within the index and load
  1949. records into memory.
  1950.  
  1951. INDEX with no parameters disables the current index and causes FIND, NEXT,
  1952. SKIP and other commands to work with the database in literal order.
  1953.  
  1954. INDEXFIELD - returns the currently indexed field
  1955.  
  1956. If the index has been set then INDEXFIELD will return the name of the field
  1957. currently indexed.
  1958.  
  1959. INDEXFILE - returns the name of the current index file
  1960.  
  1961. This function will return the actual file name of the index file.
  1962.  
  1963. INKEY - returns the next single incoming character
  1964.  
  1965. This works just like the BASIC INKEY$ function.  It returns a single character
  1966. waiting in the keyboard or communications buffer, or null if no characters
  1967. are waiting.
  1968.  
  1969. INPUT - prompts the user for input and waits for a line to be entered
  1970.  
  1971.         INPUT [prompt] inputvar
  1972.  
  1973. INPUT works just like the BASIC INPUT command.  An optional prompt can be
  1974. specified and PROZOL will wait for a full line of input terminated with
  1975. a carriage return.  The input text will be placed in the specified variable.
  1976. During input the user my type GO followed by a program name to run in the
  1977. current directory or in a directory called \PRO.  The user may also press
  1978. CTRL-C to logout, CTRL-D to toggle between ANSI emulation and TTY, CTRL-P
  1979. to print the screen on a televideo terminal, CTRL-L to output a form fee
  1980. character, or a slash (/) followed by any PROZOL command if the GOD variable
  1981. has been set to TRUE.
  1982.  
  1983. INSIDE - Return whether any arguments occur withing a string
  1984.  
  1985.         IF INSIDE Target, Source1, Source2, Source3, ...
  1986.  
  1987. For example, if you wanted to know if the variable X contained any one of
  1988. several strings, you could use INSIDE to return true or false if any one
  1989. of several strings occurred withing x.  For example, if you had a variable
  1990. called NAME which contained a person's name, and you wanted to know if the
  1991. name contained "SKI". "O'", "MC". "LE" or "LA", then you could use this
  1992. sort of expression:
  1993.  
  1994.         IF INSIDE NAME, "SKI","O'","MC","LE",LA":then do something....
  1995.  
  1996. INSTR - function to return the position of a substring within a string
  1997.  
  1998.         INSTR mainstring,searchstring
  1999.  
  2000. Returns 0 if the search string does not occur within the main string.  If it
  2001. does occur then the position of the search string within the main string will
  2002. be returned.
  2003.  
  2004. INT - calls an interrupt
  2005.  
  2006.         INT interrupt
  2007.  
  2008. ISOPEN - returns true if a database file is currently open
  2009.  
  2010. If a database is in USE then ISOPEN will return the file handle number of
  2011. the database, otherwise it will return 0
  2012.  
  2013. ITEM - sets a menu item for a subsequent MENU or XMENU call
  2014.  
  2015. Prior to issuing a MENU or XMENU command, ITEM sets the contents of a menu
  2016. item, as in
  2017.  
  2018.         ITEM 1,"Main Menu"
  2019.  
  2020. Will set the first item of a subsequent menu to "Main Menu"
  2021.  
  2022. LCASE,LOWER - function returns the lower case of an argument
  2023.  
  2024.         PRINT LCASE variable
  2025.  
  2026. LEFT - function returns the left most n characters of an argument
  2027.  
  2028.         PRINT LEFT variable,count
  2029.  
  2030. LEN - function returns the length of an argument
  2031.  
  2032.         PRINT LEN variable
  2033.         IF EVAL LEN variable=0 ...
  2034.  
  2035. LET, SET - sets the value of a variable
  2036.  
  2037.         SET A TO 1
  2038.         LET NAME BE "Erik"
  2039.  
  2040. LIST - displays all or part of the program currently in memory
  2041.  
  2042.         LIST
  2043.         LIST 10
  2044.         LIST 10 TO 100
  2045.  
  2046. LOAD - loads a program from disk into memory
  2047.  
  2048.         LOAD filename
  2049.  
  2050. LOCATE - positions the cursor at the specified coordinates
  2051.  
  2052.         LOCATE Row, Column
  2053.  
  2054. LOCK - locks a username to prevent duplicate logins
  2055.  
  2056.         LOCK "Erik"
  2057.  
  2058. LOGOUT - logout a user and reset the system, hanging up if necessary
  2059.  
  2060.         LOGOUT
  2061.  
  2062. LTRIM - function returns argument trimmed of spaces from the left
  2063.  
  2064.         PRINT LTRIM variable
  2065.  
  2066. MD,MKDIR - creates a subdirectory
  2067.  
  2068.         MD "\NEW"
  2069.  
  2070. MENU - displays a square box on the screen containing a menu
  2071.  
  2072.         MENU top,left,bottom,right,title
  2073.  
  2074. MENU displays a menu of items specified with the ITEM command.  This routine
  2075. then prints a "Select -->" prompt below the menu and waits for input.  What-
  2076. ever was input by the user is returned.  MENU is a function, so it must
  2077. be used in an expression or variable assignment, as in
  2078.  
  2079.         SET A TO MENU 10,20,15,40,"Main Menu"
  2080.  
  2081. MENUCOLOR - sets the default color of menus
  2082.  
  2083. Before making an XMENU call, a MENUCOLOR must be specified.  MENUCOLOR must
  2084. be set to a symbolic color code, such as "^W^b" for a white background and
  2085. black foreground.
  2086.  
  2087.  
  2088. MID,SUBSTR - returns a substring withing a string
  2089.  
  2090.         SET DAY TO MID DATE,4,2
  2091.  
  2092. This function works just like the BASIC MID$ function except that parenthesis
  2093. are not used.
  2094.  
  2095. MORE - sets the number of lines for scrolling text files
  2096.  
  2097. When TYPE commands are used to display files to the screen, the MORE setting
  2098. will pause the display every few lines.  For instance, if you want the file
  2099. to pause every 23 lines, then you could specify
  2100.  
  2101.         MORE 23
  2102.  
  2103. and all subsequent TYPE commands will pause the file listing every 23 lines.
  2104.  
  2105.         MORE 0
  2106.  
  2107. will turn off pausing.
  2108.  
  2109. NEG,MINUS - negates an argument, use instead of -
  2110.  
  2111. Since the minus sign is treated like an individual keyword in PROZOL, you can
  2112. only negate a literal value with NEG or MINUS.  In other words,
  2113.  
  2114.         SET A TO -1
  2115.  
  2116. Will set A to "-" and throw away the 1, since it is considered to be a
  2117. second parameter.  In order to set a variable to a negative number you must
  2118. say
  2119.  
  2120.         SET A TO NEG 1
  2121.  
  2122. NEXT - gets the next record in a database
  2123.  
  2124. If an index has been set with the INDEX command then NEXT will skip to the
  2125. next record in the index and load it.  If no index has been set then NEX
  2126. will skip to the next physical record in the database.
  2127.  
  2128. NOT - returns a logical NOT of an argument
  2129.  
  2130.         IF NOT A:PRINT "A is false!"
  2131.  
  2132. NUMFIELDS - function returns the number of fields in the database
  2133.  
  2134. OFF - returns 0
  2135.  
  2136. This can be used in place of 0 wherever desired.  For instance, to set the
  2137. GOD variable to 0 you could just say GOD OFF.
  2138.  
  2139. OFIND - returns a matching record number from an IX file
  2140.  
  2141. OFIND is a function which returns the record number of a random access index
  2142. file.  You must specify the file name, the data to find in the index, and the
  2143. field length of each record in the random access index.  For example,
  2144.  
  2145.         SET R TO OFIND "BIGINDEX", "OLSON, ERIK", 24
  2146.  
  2147. Will search a random access file named "BIGINDEX" for the first entry that
  2148. matches "OLSON, ERIK".  Each record in this random access file is 20 characters
  2149. long plus 4 bytes for a long integer pointer which is returned by the function.
  2150. The file is searched using a binary halving message so it must be alphabetized.
  2151. The pointer location of the record is retained for subsequent OSKIP functions.
  2152. These index files can be created with dBASE or BASIC or other languages
  2153. which are capable of creating alphabetized random access files.  These indexes
  2154. cannot be updated without being completely rebuilt, but they have the
  2155. advantage of being extremely fast and can be as large as any disk capacity.
  2156. No matter how large these indexes get, the search and skip performance
  2157. within them will be nearly instantaneous.  They do have the major drawback
  2158. of being read-only and cannot be updated on the fly.  They are very
  2159. good for large read-only databases that are not frequently updated, such
  2160. as multi-million record phone lists or property records.
  2161.  
  2162. OLM - sets OLM scanning on or off or sends an OLM message to another user
  2163.  
  2164.         OLM user,message
  2165.  
  2166. If the user is currently on line the message will appear on the target user's
  2167. screen as soon as he has been sitting idle for 10 seconds.  If the user is
  2168. not online then the message will appear as soon as the user logs in and is
  2169. idle for 10 seconds.
  2170.  
  2171.         OLM ON|OFF
  2172.  
  2173. By default OLM checking is OFF since it slightly slows down performance for
  2174. the current user.  If OLM checking is turned on then any OLM messages sent
  2175. or any messages waiting will be displayed as soon as the user has been
  2176. idle for 10 seconds.
  2177.  
  2178. ON - returns -1
  2179.  
  2180. ON can be used wherever -1 (or TRUE) would be used.  For instance, many
  2181. toggles are turned on or off with ON and OFF.  ON and OFF are simply
  2182. synonyms for TRUE and FALSE, which are the same as -1 and 0.
  2183.  
  2184. ONERROR - sets a string which contains a routine to execute on error
  2185.  
  2186. When a non-critical error occurs (such as Out of Memory or Com Buffer
  2187. Overflow) then a user defined subprogram can be executed.  The argument
  2188. to ONERROR must contain the entire subprogram to execute.  It can be
  2189. in the form of a disk file:
  2190.  
  2191.         ONERROR FILE filename
  2192.  
  2193. or in the form of a variable
  2194.  
  2195.         ONERROR variable
  2196.  
  2197. or a literal string
  2198.  
  2199.         ONERROR "print 'error!':logout"
  2200.  
  2201. or a subroutine in your program:
  2202.  
  2203.         ONERROR LINE ERRORHANDLER
  2204.  
  2205. ONLOGOUT - sets a string which contains a routine to execute on logout
  2206.  
  2207. ONLOGOUT works very much the same as ONERROR, except it specifies a subroutine
  2208. to execute whenever the user logs out for any reason (including CTRL-C)
  2209. except for when a critical error occurs, such as a communications buffer
  2210. overflow or out of memory error.
  2211.  
  2212. OPEN - opens a sequential file for input or output
  2213.  
  2214.         OPEN "I" filename
  2215.         OPEN "O" filename
  2216.         OPEN "A" filename
  2217.         OPEN "R" filename
  2218.         OPEN "B" filename
  2219.  
  2220. Files can be opened for Input, Output, or Append.  You can also open non
  2221. sequential files for Random access or Binary access.  Files opened in this
  2222. manner must be closed with CLOSE followed by the mode character in quotes.
  2223.  
  2224. Files opened for input can be read one (comma delimited ascii) field at a
  2225. time with the READ command.  Files opened for output or append can be
  2226. written to with the WRITE command.  WRITE will not automatically delimit
  2227. output.  You must do that yourself, and add carrige returns with CR.
  2228.  
  2229. Files opened for Random access can be read as database records with the
  2230. MAP command or with the most recent TYPE structure definition.  The GET
  2231. command followed by the name of a TYPE structure or MAP variable will
  2232. load the fields specified.  The PUT command followed by a TYPE structure
  2233. or MAP variable and a record number will write to the file.
  2234.  
  2235. Files opened as Binary files can be read with the GET function, in which
  2236. you must specify the starting byte and the number of bytes to read from
  2237. the file.  To write to a file you must use the PUT function followed by
  2238. a starting byte value and a string to write to the file.  Both GET and
  2239. PUT for binary files use a base of 1 for the first byte in the file.
  2240.  
  2241. OR - returns the logical OR of two items
  2242.  
  2243.         IF A or B:PRINT "one of the is true!"
  2244.  
  2245. OSKIP - returns skipped n number of records in an IX file
  2246.  
  2247.         OSKIP n
  2248.         OSKIP NEG n
  2249.         OSKIP MINUS n
  2250.  
  2251. OSKIP is a function which returns the record number of an index originally
  2252. searched with the OFIND function.  See OFIND for more information on what
  2253. O indexes are and how to create them.
  2254.  
  2255. PREV,PREVIOUS - skips to the previous record in a database
  2256.  
  2257. If an index is defined then this command will skip backwards one record in
  2258. the index and load the record into memory.  If an index has not been defined
  2259. then this function will skip backward one physical record in the database.
  2260.  
  2261. PRINT - prints all arguments to the screen with a carriage return
  2262.  
  2263. PRINT followed by any number of parameters will print all parameters to the
  2264. screen.
  2265.  
  2266.         PRINT "You selected " X " as your response"
  2267.  
  2268. PRINT will always follow output with a carriage return.  To print without a
  2269. carriage return use the PROMPT command.
  2270.  
  2271. PROMPT - prints all arguments to the screen
  2272.  
  2273. PROMPT is the same as the PRINT command except it is not followed by a
  2274. carriage return.
  2275.  
  2276. PUT - writes a record to a database file
  2277.  
  2278. PUT followed by a record number will write the current field variables to
  2279. the database. PUT with 0 or no record number will append the fields to
  2280. the database file.  PUT followed by two arguments will write data to a
  2281. random access or binary file.  The first argument is the record number
  2282. or byte position, the second argument if the data to write to the file.
  2283. You cannot have a random access and a binary file open at the same time.
  2284.  
  2285. PUTFILE - appends an argument to the specified disk file
  2286.  
  2287.         PUTFILE filename,data
  2288.  
  2289. The filename will be opened for append and the data will be written to the
  2290. end of the file.  You must specify a CR at the end of the data if you wish
  2291. to append a carriage return to the end of the data you are writing to the
  2292. file, as in
  2293.  
  2294.         PUTFILE filename,data & CR
  2295.  
  2296. QUIT - exits the interpreter to DOS
  2297.  
  2298. QUIT should only be use locally unless you want the PROZOL interpreter to
  2299. exit to DOS without any logging out of the user.  QUIT immediately
  2300. terminates the interpreter.  If a communications line is active it will
  2301. be hung up and reset first.  To run another program without resetting the
  2302. modem use the EXECUTE command.
  2303.  
  2304. RD - erases a subdirectory from the hard drive
  2305.  
  2306. RAW - outputs unprocessed text which may contain symbols and functions.
  2307.  
  2308. If you said PRINT "@CHR(65)" then PROZOL would print A on the user's screen.
  2309. If you wanted to literally print @CHR(65) or any other control code then
  2310. use the RAW command instead of PRINT.  This is useful for displaying lines
  2311. of a help screen which may contain references to symbols, functions, or
  2312. variables that would otherwise be processed before output.
  2313.  
  2314. READ - reads a line or item from a sequential file
  2315.  
  2316.         READ var
  2317.  
  2318. This would read the next item from a comma delimited ascii file opened with
  2319. OPEN "I".  To read an entire line ignoring delimiters, use READ in this
  2320. manner
  2321.  
  2322.         READ ALL var
  2323.  
  2324. RECNUM,RECNO - function returns the current database record number
  2325.  
  2326. Both functions can be used interchangeable to return the current database
  2327. record number.  If no record number has been loaded or if the result of
  2328. a previous FIND was not successful then this function will return 0.
  2329.  
  2330. REG - sets a register for an interrupt call
  2331.  
  2332. This is used in conjuntion with the INT command.  Prior to calling an
  2333. interupt you may want to set the values of certain CPU registers.
  2334.  
  2335.         REG n,val
  2336.  
  2337. sets the value of a register.  You may use hex notation with &H or binary
  2338. notation with &H in front of the number.  For instance,.
  2339.  
  2340.         REG 1,&HFF
  2341.  
  2342. will set the hex value of FF to the AX register.  register numbers
  2343. correspond to this table:
  2344.  
  2345.         1 - AX
  2346.         2 - BX
  2347.         3 - CX
  2348.         4 - DX
  2349.         5 - DS
  2350.         6 - ES
  2351.         7 - SS
  2352.         8 - SI
  2353.         9 - DI
  2354.  
  2355. REN,RENAME - renames a disk file or directory
  2356.  
  2357.         REN source,target
  2358.  
  2359. RESET - logs out the current user and resets the system
  2360.  
  2361. RESET is the same as LOGOUT except it will bypass the ONLOGOUT subroutine
  2362. if one has been set.
  2363.  
  2364. RESTART - same as reset
  2365.  
  2366. RETURN - returns to caller from a GOSUB routine
  2367.  
  2368. GOSUB label will jump to any line beginning with the specified label.
  2369. The program will continue to execute line by line until RETURN is issued,
  2370. at which point execution of the program will begin at the line immediately
  2371. following the line containing the most recent GOSUB.  GOSUBs can be nested
  2372. to 32 levels.
  2373.  
  2374. RIGHT - function returns the right most n characters from a string
  2375.  
  2376.         PRINT RIGHT variable,count
  2377.  
  2378. ROW - function returns the current cursor row
  2379.  
  2380.         SET X TO ROW
  2381.  
  2382. This function is the same as the BASIC CSRLIN function only it applies to
  2383. both ANSI and TTY output.
  2384.  
  2385. RTRIM - function returns a string argument with spaces trimmed from right
  2386.  
  2387.         PRINT RTRIM variable
  2388.  
  2389. RUN - runs a specified interpreted program
  2390.  
  2391.         RUN "program"
  2392.  
  2393. An extension of .PRO is assumed if not specified.  RUN loads an executes an
  2394. PROZOL program.
  2395.  
  2396. SAVE - saves the current program in memory do disk
  2397.  
  2398. After a program has been entered using line numbers at the PROZOL command
  2399. line it can be saved to disk with the SAVE command.  An extension of .PRO
  2400. is assumed if not provided in the filename.
  2401.  
  2402. SEND - transmits an argument to a secondary port opened with CONNECT
  2403.  
  2404. If a secondary serial port has been opened with the CONNECT command then
  2405. characters can be sent to it with the SEND command.  A string parameter to
  2406. SEND will be transmitted through an alternate serial port.  CONNECT and
  2407. SEND can be used to allow users to dial into your system and then dial
  2408. through your system into another system.
  2409.  
  2410. SETPROMPT - sets the immediate mode prompt
  2411.  
  2412. SETPROMPT followed by a string parameter will set the prompt which is
  2413. displatyed on the screen while you are in command mode.  Command mode is
  2414. also referred to as "immediate" mode.  The default prompt is set up during
  2415. the CONFIG process.  To set the prompt to a DOS prompt, you might say
  2416.  
  2417.         SETPROMPT "@CHR(13)@CHR(10)@DOS()>"
  2418.  
  2419. For security reasons you will probably want to set the prompt up to auto-
  2420. matically log out the user should it ever display.  You probably DO NOT
  2421. want users to have access to a command prompt, so should they ever find
  2422. their way to one, you could make the prompt automatically kick them out with
  2423. this setting:
  2424.  
  2425.         SETPROMPT "@LOGOUT()"
  2426.  
  2427. SKIP - skips the specified number of records in a database
  2428.  
  2429. If an index has been set then SKIP n will skip n number of records in the
  2430. current index and load the ultimate record into memory.  If no index has
  2431. been set then SKIP will skip the specified number of records physically in
  2432. the database.  Remember that negative constants are not possible in PROZOL
  2433. so you must use the NEG or MINUS keywords to indicate a negative number
  2434. constant with SKIP, such as
  2435.  
  2436.         SKIP NEG 1
  2437.  
  2438. If a variable contains a negative number then you do not have to use the
  2439. NEG or MUNUS keywords.
  2440.  
  2441. TAB - returns a tab character
  2442.  
  2443.         PRINT A TAB B TAB C
  2444.  
  2445. Will print A, B and C separated by tabs (ascii code 9)
  2446.  
  2447. TAG - writes a tag value to a tag file
  2448.  
  2449.         TAG filename,value
  2450.  
  2451. This appends a long integer value to the file specified.  This command
  2452. is used to mark records in a database for a specific user or any other
  2453. function you can use it for.  You can return the number of records that
  2454. have been added to the tag file with the TAGGED function.  You can return
  2455. the long integer value of a specific tagged record with the GETTAG function.
  2456.  
  2457. TAGGED - returns the number of items in a tag file
  2458.  
  2459. TIME - returns the current time
  2460.  
  2461. TIMEOUT - sets the user timeout value in minutes
  2462.  
  2463. By default a user has 3600 minutes per login session.  You can set this
  2464. limit to anything from 0 minutes on up.  0 minutes is a good way of locking
  2465. out users who have not paid their bills without removing their passwords
  2466. from the database.  It really gets their attention because they are kicked
  2467. out as soon as they are done logging in!
  2468.  
  2469. TO, IN, WITH, IS, BE, EQUAL, OF, THE, AT, AS, ?, THEN  - dummy key words
  2470.  
  2471. You can use any of these keywords wherever you may deem appropriate to make
  2472. your source code more readable.  Here are some examples of where you might
  2473. use these "do nothing" keywords:
  2474.  
  2475.         SET A TO 1
  2476.         BE UNTIL LEN INKEY
  2477.         IF EVAL A IS EQUAL TO B
  2478.         PRINT X IN COLOR F,B AT LOCATE X,Y
  2479.         IF CALC A=B THEN
  2480.         IS A IS THE SAME AS B
  2481.         SET X TO ?
  2482.  
  2483.  
  2484. TOP,FIRST - jumps to the first record in a database
  2485.  
  2486. If an index has been set then these commands will jump to the first record
  2487. in the database index and load it otherwise they will go to the first
  2488. physical record in the database (literal record 1) and load it.
  2489.  
  2490. TROFF - disables line tracing
  2491.  
  2492. By default TROFF is off.  Use TRON for debgging to print each command to
  2493. the screen in curly braces as it is being executed.
  2494.  
  2495. TRON - enables line tracing
  2496.  
  2497. Use TRON for debugging.  Unlike BASIC, TRON will not print line numbers to
  2498. the screen, it will print each literal command, function, or variable as it
  2499. is being evalueated by the interpreter.  This is very handly for seeing where
  2500. the program may seem to be going astray.
  2501.  
  2502. TRUE, ON, YES - returns -1
  2503.  
  2504. Use TRUE, ON, or YES in place of a logical -1 (true) wherever desired.
  2505.  
  2506. TTY - disables ANSI terminal emulation
  2507.  
  2508. By default, ANSI emulation is enabled.  TTY will cause all subseuent COLOR,
  2509. LOCATE, CLS and other control codes to be supressed.  Some functions, like
  2510. LOCATE and CLS will be replaced with a simple carriage return.  Also MENU,
  2511. XMENU, and WINDOW functions will operate in a teletypewriter format instead
  2512. of animated ANSI displays.
  2513.  
  2514. TYPE - dumps a file to the screen, processing metastatements and functions
  2515.  
  2516.         TYPE filename
  2517.  
  2518. This command will type a file to the screen.  Any embedded variables,
  2519. ANSI color symbols. functions, or metacommands will be evalueated.  See the
  2520. section previous to this keyword list for more information on these special
  2521. codes that you can embed in files that are being TYPEd to the screen.
  2522. TYPE is ideal for displaying menus, help screens, database record screens,
  2523. messages, and anything else.
  2524.  
  2525.  
  2526. UCASE,UPPER - function returns the upper case of a string
  2527.  
  2528.         PRINT UCASE variable
  2529.  
  2530. UNLOCK - releases the current user from multiple login protection
  2531.  
  2532.         UNLOCK "Erik"
  2533.  
  2534. UNTIL - control command iterates current line until argument is true
  2535.  
  2536.         PRINT "Press a key!" UNTIL LEN INKEY
  2537.  
  2538. UNTIL will continue to iterate the current function or line until the condition
  2539. which follows UNTIL is satisfied.  You can apply UNTIL to a block of code
  2540. or subroutine with curly braces using the following format:
  2541.  
  2542.         PROCEDURE {
  2543.                         statements
  2544.                         statements
  2545.                         statements } UNTIL condition
  2546.  
  2547. USE - opens a database for use
  2548.  
  2549.         USE filename
  2550.  
  2551. The specified filename is loaded as a dBASE compatable database and prepared
  2552. for use.  An extension of .DBF is assumed if not otherwise specified.
  2553.  
  2554. VAL - function returns the numeric value of an argument
  2555.  
  2556.         PRINT VAL A
  2557.  
  2558. VIEW - displays the current record of a database on the screen
  2559.  
  2560. If a record format file has been specified or if FIELD statements have
  2561. been used to specify a record format for the scren then the specified format
  2562. will be used to display the current record, otherwise a default display
  2563. format will be used.
  2564.  
  2565. WHILE - control command iterates current line while argument is true
  2566.  
  2567. WHILE is just like UNTIL, except it will iterate a line or block statement
  2568. for as long as the supplied condition is true.  For example, on a single
  2569. line you could say
  2570.  
  2571.         do something UNTIL condition
  2572.  
  2573. or in a subroutine you could write
  2574.  
  2575.         procedure {
  2576.                         statements
  2577.                         statements
  2578.                         } UNTIL condition
  2579.  
  2580. and the procedure will iterate continuously until the supplied condition
  2581. evalueates to true.
  2582.  
  2583.  
  2584. WINDOW - displays a box on the screen containing a title
  2585.  
  2586. A box will appear on the screen surrounding the specified coordinates
  2587. and the supplied title will be contained within the box.  For example,
  2588.  
  2589.         WINDOW 5,10,5,70,"This is a Box!"
  2590.  
  2591. Will display a window from the 4th line to the 6th line of the screen from
  2592. the 10th column to the 70th column and the title "This is a Box!" will be
  2593. centered within the box.
  2594.  
  2595. WRITE - prints argument to a sequential file
  2596.  
  2597.         WRITE string [& CR]
  2598.  
  2599. Writes a raw string of output to a sequential file opened with the OPEN
  2600. statement.  Any string written to an output file is written literally with
  2601. out a carriage return or delimiter unless specified with & CR (which adds
  2602. a carriage return to output).
  2603.  
  2604.  
  2605. XMENU - displays a scroll-bar menu on the screen
  2606.  
  2607.         SET variable to XMENU top, left, bottom, right, Titlestring
  2608.  
  2609. XMENU displays an animated ANSI menu using the items itemized with then
  2610. ITEM statement. XMENU is a function which returns the menu item specified
  2611. or 0 if the user chose to abort the menu with "X".  While the menu is
  2612. being displayed the user may press CTRL-G which will pop up a box within
  2613. which the user may specify a GO command to run another program. If ANSI
  2614. emulation is not active then a standard INPUT prompt is displayed
  2615. instead of the animated menu.  During execution of the animated menu the
  2616. user may use the arrow keys to select a menu item if they are using
  2617. Procomm, Telix, or Qmodem, otherwise they must use SPACE or the + and - keys
  2618. to select menu items, or they may enter a number from 1 to the maximum menu
  2619. item number to select a menu option.
  2620.  
  2621. XMODEM - transfers a file using the XMODEM protocol
  2622.  
  2623.         XMODEM IN filename
  2624.         XMODEM OUT filename
  2625.  
  2626. This command will initiate an internal XMODEM file transfer routine.  For
  2627. other file tansfer protocols, use SHELL or DOOR to run external public
  2628. domain, shareware, or commercial file transfer protocol programs.  Xmodem,
  2629. Ymodem, and Zmodem are provided with the DSZ program and KERMIT is provided
  2630. with the KERMIT program included with PROZOL.
  2631.  
  2632. LIMITS TO PROZOL
  2633. ================
  2634.  
  2635. Currently, dBASE databases can be indexed to up to 65,535 records.  This will
  2636. be increased in the very near future to 2 trillion records.  Right now up
  2637. to 2 trillion records can be indexed using the external indexes accessed
  2638. with OFIND, OSKIP, ONEXt and OPREV.  These indexes can be created with
  2639. any external database application.  See the entry for OFIND for more
  2640. information on these "superfast" indexes.
  2641.  
  2642. All numeric variables are considered to be single-precision floating point
  2643. variables which have a resolution of up to 8 deciman places.
  2644.  
  2645. Any string variable, subroutine, or FILE parameter can be up to 32K lin
  2646. length.
  2647.  
  2648. Programs are limited to 1000 lines each.  You may have 1000 variables
  2649. defined in memory at any given time.  All variables must reside within
  2650. 640K along with Prozol.  Each program must be 64K or less in size.
  2651.  
  2652. COM ports must be standard UART serial ports (non-intelligent) and modems
  2653. must be Hayes-compatible.  COM ports can be any IRQ and and port address.
  2654. There is no limit to the number of COM ports that can be used under a
  2655. multi-tasking platform or on a network.
  2656.  
  2657. Only 6 users may chat simultaneously.
  2658.  
  2659. PROZOL requires at least 256K of memory and will run on any IBM compatible
  2660. PC, or a PC running windows, OS/2 or Desqview.  Prozol requires DOS verison
  2661. 3.3 or higher, and requires at least 360K of disk space.
  2662.  
  2663. Each line may contain up to 256 separate statements.
  2664.  
  2665. * * *
  2666.  
  2667. This entire document was written while getting extremely hammered at the
  2668. Promenades lounge on US 41 in Port Charlotte, Florida, December 7, 1993.
  2669. It is dedicated to Anheuser-Busch and the very cute girl who kept me
  2670. supplied with Michelob Lights while I was writing this on my incredibly
  2671. cheap Tandy 1100 laptop, which I bought for just this purpose.  It is also
  2672. dedicated to Mr. Augie Busch (of Anheuser-Busch and Busch Gardens, Tampa)
  2673. who I spilled the very cold ice water on at the Wine Cellar restaurant
  2674. in 1986.  He was very mature about that.  I was not a waiter, I was the
  2675. computer guy, conscripted by the owner of the restaurant to fill in for
  2676. someone who had better things to do than come to work.  Instead of cash
  2677. I made sure he gave me two bottles of Lafon Rochet '82 which my brother
  2678. and I pounded down in the car on the way home from work that night.  It
  2679. doesn't get any better than that.
  2680.  
  2681.