home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / SIMTEL / CPMUG / CPMUG031.ARK / TBASIC.7 < prev    next >
Text File  |  1984-04-29  |  3KB  |  74 lines

  1. * DROP <numeric expression>,<numeric expression>
  2. Drops the assignment of the logical device selected by the first
  3. expression to the physical device selected by the second expression.
  4. Examples:   DROP 1,1     DROP LOGICAL,PHYSICAL    DROP PRINTD,TTY
  5.  
  6. END
  7. Puts BASIC back in command mode.  Normally the last statement in
  8. a program.  Not required.  Example:    END
  9.  
  10. FOR <variable name> = <expr1> TO <expr2> [STEP <expr3>]
  11. Execution sets <variable name> = <expr1>.  The program then proceeds
  12. until a "NEXT" statement is encountered.  <expr3> (or 1 if STEP <expr3>
  13. is omitted) is then added to <variable name>.  If <expr3> < 0 and
  14. <variable name> >= <expr2>, or if <expr3> >0 and <variable name> <= <expr3>,
  15. then the program continues with the statement following the "FOR" statement.
  16. Otherwise, the program continues after the "NEXT" statement.
  17. Example:  FOR N=1 TO 5        Example:  FOR IND=START TO FINISH STEP INCR
  18.  
  19. * GOPROC <line descriptor>[,<variable list>]
  20. Calls the statement <line descriptor>, passing the variables on the
  21. list.  Similar to GOSUB, except it allows the subroutine to have
  22. local variables, which are not affected by assignments outside
  23. the procedure.  Also allows passing variables to the subroutine.
  24. The subroutine need not contain a PROCEDURE statement.
  25. Example:    GOPROC SEARCH,STR1$,STR2$,POSITION
  26.  
  27.  
  28. GOSUB <line descriptor>
  29. A subroutine call is made to the line indicated.  That is,
  30. execution continues at <line descriptor> until a RETURN statement
  31. is encountered, at which time execution is continued at the
  32. statement following the GOSUB statement.
  33. Examples:  GOSUB CALC    GOSUB 10570    GOSUB GET+1
  34.  
  35. GOTO <line descriptor>
  36. An unconditional branch is made to the line indicated.  That is,
  37. execution continues at <line descriptor> instead of the next
  38. statement.  Examples:  GOTO 100    GOTO LOOP+2    GOTO LAST-5
  39.  
  40. * IF <logical expression> GOTO <line descriptor>
  41. If the value of <logical expression> = -1, then execution
  42. continues at the line indicated.  Otherwise, execution continues
  43. with the line following the IF statement.  The logical connectives
  44. allowed in <logical expression> are:  AND, OR, NOT, >, <, = .
  45. See Appendix B for explanation of logical expressions.
  46. Examples:  IF X<128 AND X>31 GOTO EXTRA    IF STR$<>"NO" GOTO 100
  47.  
  48. * IF <logical expression> THEN <statement> [ELSE <statement>]
  49. If the value of <logical expression> = -1 (true), then the first
  50. <statement> is executed.  Otherwise, it is not.  If the ELSE option is
  51. used, the second statement is executed if the value of <logical
  52. expression> is false.  See Appendix B for def. of logical expression.
  53. Examples:  IF ANS$="YES" THEN GOSUB INSTR        IF 3*Y=4 THEN PRINT "OK"
  54.        IF ARRAY(N)=0 THEN GOTO LOOP ELSE STOP
  55.  
  56. INPUT <variable list>
  57. Assigns entries from the console device to the variables on the list.
  58. Prompts may be included by enclosing a string expression in quotes,
  59. separated from the variables by semicolons.  Prompts are printed in
  60. the order they appear on the list.  With no prompt, a "?" is printed.
  61. A carriage return must be used to terminate string input.
  62. Examples:  INPUT A,B$    INPUT "FILENAME";NAM$
  63.  
  64.                 7
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.