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.8 < prev    next >
Text File  |  1984-04-29  |  3KB  |  69 lines

  1. [LET] <variable name>=<expression>
  2. Assigns the value of <expression> to <variable name>.  The word
  3. "LET" is optional.  Examples:  LET X$=Y$+Z$    LET INDEX=5
  4.  
  5. NEXT [<variable list]
  6. Terminates a "FOR" loop.  Without the optional variable list,
  7. it terminates the most recent loop.  See the "FOR" statement.
  8. Examples:  NEXT        NEXT N        NEXT I,J,K
  9.  
  10. ON <numeric expression> GOTO <line descriptor list>
  11. Transfers execution (branches) to the line in the list corresponding
  12. to the value of INT(<numeric expression>).  If <numeric expression>=0 or
  13. if it's greater than the number of line descriptors, execution
  14. continues with the next statement.  If it's <0 an error results.
  15. Examples:  ON N GOTO 10,20,30,40    ON N-2 GOTO FIRST,CALC,LAST
  16.  
  17. ON <integer expression> GOSUB <line descriptor list>
  18. Calls a subroutine at the line in the list corresponding to
  19. the value of <integer expression>.  If <integer expression>
  20. equals zero, or if it's greater than the number of line
  21. descriptors, execution continues with the next statement.  If
  22. it's less than zero, an error results.
  23. Examples:  ON I GOSUB 20,5,100,10     ON 2*I GOSUB TEST+2,SUBR5
  24.  
  25. OUT <expression1>,<expression2>
  26. Sends byte resulting from <expression2> to port <expression1>.
  27. Examples:  OUT 1,7    OUT PORT,DATA    OUT X-5,Z+2
  28.  
  29. POKE <expression1>,<expression2>
  30. Stores byte <expression2> in memory location <expression1>.
  31. Examples:  POKE 4096,255    POKE ADDRESS,BYTE    POKE A+256,48+N
  32.  
  33. PRINT <expression list>  or   ?<expression list>
  34. Prints the value of each expression on the expression list
  35. onto the console device.  Spacing between elements is defined
  36. by punctuation.  A comma starts the following element at the
  37. next 14 column field.  A semicolon starts the following
  38. element immediately after the preceeding element.  If the last
  39. character of the list is a comma or a semicolon, no carriage
  40. return will be printed at the end of the statement.  Otherwise,
  41. a carriage return will be printed at the end of the statement.
  42. Examples:  PRINT "X=",X    PRINT 33*X,A$,CHR$(7)
  43.  
  44. * PROCEDURE <variable list>
  45. Used to declare local variables.  The variables on the list can be
  46. used without disturbing their original values.  The original value
  47. of each variable will be restored by the next RETURN statement.
  48. See RECEIVE and RETURN statements.
  49. Examples:  PROCEDURE ANS$,X    PROCEDURE A,B,RESULT
  50.  
  51. READ <variable list>
  52. Assigns the value of each expression of a "DATA" statement to
  53. a variable on the variable list, starting with the first element
  54. of the first "DATA" statement.  Expressions of the "DATA"
  55. statement(s) are evaluated when the first element of the "DATA"
  56. statement is read.  Examples:  READ X,Y,z$    READ TABLE(N)
  57.  
  58.  
  59.                8
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.