ChipMaster's bwBASIC This also includes history going back to v2.10. *WARN* some binary files might have been corrupted by CRLF.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

874 lines
37 KiB

  1. ============================================================
  2. GENERAL
  3. ============================================================
  4. OPTION VERSION "ECMA-55"
  5. REM INTERNAL ID: E78
  6. REM DESCRIPTION: ANSI Minimal BASIC
  7. REM REFERENCE: STANDARD ECMA-55: Minimal BASIC
  8. REM by EUROPEAN COMPUTER MANUFACTURERS ASSOCIATION
  9. REM (c) 1978, EUROPEAN COMPUTER MANUFACTURERS ASSOCIATION
  10. REM http://www.ecma-international.org/publications/files/
  11. REM ECMA-ST-WITHDRAWN/ECMA-55,%201st%20Edition,%20January%201978.pdf
  12. REM
  13. OPTION STRICT OFF
  14. OPTION ANGLE RADIANS
  15. OPTION BUGS OFF
  16. OPTION LABELS OFF
  17. OPTION COMPARE BINARY
  18. OPTION COVERAGE OFF
  19. OPTION TRACE OFF
  20. OPTION ERROR GOTO
  21. OPTION IMPLICIT
  22. OPTION BASE 0
  23. OPTION RECLEN 128
  24. OPTION DATE "%m/%d/%Y"
  25. OPTION TIME "%H:%M:%S"
  26. OPTION PUNCT STRING "$"
  27. OPTION PUNCT DOUBLE "#"
  28. OPTION PUNCT SINGLE "!"
  29. OPTION PUNCT CURRENCY " "
  30. OPTION PUNCT LONG "&"
  31. OPTION PUNCT INTEGER "%"
  32. OPTION PUNCT BYTE " "
  33. OPTION PUNCT QUOTE """
  34. OPTION PUNCT COMMENT " "
  35. OPTION PUNCT STATEMENT " "
  36. OPTION PUNCT PRINT " "
  37. OPTION PUNCT INPUT " "
  38. OPTION PUNCT IMAGE " "
  39. OPTION PUNCT LPAREN "("
  40. OPTION PUNCT RPAREN ")"
  41. OPTION PUNCT FILENUM "#"
  42. OPTION PUNCT AT " "
  43. OPTION USING DIGIT "#"
  44. OPTION USING COMMA ","
  45. OPTION USING PERIOD "."
  46. OPTION USING PLUS "+"
  47. OPTION USING MINUS "-"
  48. OPTION USING EXRAD "^"
  49. OPTION USING DOLLAR "$"
  50. OPTION USING FILLER "*"
  51. OPTION USING LITERAL "_"
  52. OPTION USING FIRST "!"
  53. OPTION USING ALL "&"
  54. OPTION USING LENGTH "%"
  55. ============================================================
  56. COMMANDS
  57. ============================================================
  58. ------------------------------------------------------------
  59. SYNTAX: DATA constant [, ...]
  60. DESCRIPTION: Stores numeric and string constants to be
  61. accessed by READ.
  62. ------------------------------------------------------------
  63. SYNTAX: DEF FNname[( arg [,...] )] = value
  64. DESCRIPTION: Defines a single-line function. Single-line
  65. functions require an equal sign.
  66. ------------------------------------------------------------
  67. SYNTAX: DIM [# filenum,] variable([ lower TO ] upper)
  68. DESCRIPTION: Declares variables and specifies the
  69. dimensions of array variables. For array
  70. variables, if the lower bound is not
  71. provided, then the OPTION BASE value is used.
  72. If filenum is provided, then the variable is
  73. virtual.
  74. ------------------------------------------------------------
  75. SYNTAX: EDIT
  76. DESCRIPTION: implementation defined.
  77. ------------------------------------------------------------
  78. SYNTAX: END
  79. DESCRIPTION: Terminates program execution. If the BASIC
  80. program was executed from the operating
  81. system level, then control returns to the
  82. operating system, oterwise control reuturns
  83. to the BASIC prompt.
  84. ------------------------------------------------------------
  85. SYNTAX: FOR variable = start TO finish [STEP
  86. increment]
  87. DESCRIPTION: Top of a FOR - NEXT structure. The loop will
  88. continue a fixed number of times, which is
  89. determined by the values of start, finish,
  90. and increment.
  91. ------------------------------------------------------------
  92. SYNTAX: GO
  93. DESCRIPTION: Syntax Error.
  94. ------------------------------------------------------------
  95. SYNTAX: GO SUB line
  96. DESCRIPTION: Initiates a subroutine call to the line
  97. specified. The subroutine must end with
  98. RETURN. The line may be a number or a label.
  99. ------------------------------------------------------------
  100. SYNTAX: GO TO line
  101. DESCRIPTION: Branches program execution to the specified
  102. line. The line may be a number or a label.
  103. ------------------------------------------------------------
  104. SYNTAX: GOSUB line
  105. DESCRIPTION: Initiates a subroutine call to the line
  106. specified. The subroutine must end with
  107. RETURN. The line may be a number or a label.
  108. ------------------------------------------------------------
  109. SYNTAX: GOTO line
  110. DESCRIPTION: Branches program execution to the specified
  111. line. The line may be a number or a label.
  112. ------------------------------------------------------------
  113. SYNTAX: IF value THEN line1 [ELSE line2]
  114. DESCRIPTION: Single line standard IF command. If the value
  115. is non-zero, then branh to line1. If the
  116. value is zero and ELSE is provided, then
  117. branch to line2. Otherwise continue to the
  118. next line. LABELS are not allowed.
  119. ------------------------------------------------------------
  120. SYNTAX: INPUT "prompt string" , variable [, ...]
  121. DESCRIPTION: Reads input from the terminal after displaying
  122. a prompt.
  123. ------------------------------------------------------------
  124. SYNTAX: INPUT # filenum , variable [, ...]s
  125. DESCRIPTION: Reads input from the file specified by
  126. filenum.
  127. ------------------------------------------------------------
  128. SYNTAX: INPUT variable [, ...]
  129. DESCRIPTION: Reads input from the terminal.
  130. ------------------------------------------------------------
  131. SYNTAX: [LET] variable [, ...] = value
  132. DESCRIPTION: Assigns the value to the variable. The LET
  133. keyword is optional.
  134. ------------------------------------------------------------
  135. SYNTAX: LIST line1 [- line2]
  136. DESCRIPTION: Lists BASIC program lines from line1 to line2
  137. to the console on stdout.
  138. ------------------------------------------------------------
  139. SYNTAX: LOAD [filename$]
  140. DESCRIPTION: Loads an ASCII BASIC program into memory.
  141. ------------------------------------------------------------
  142. SYNTAX: LPRINT [USING format-string$;] value ...
  143. DESCRIPTION: Send output to the printer (stderr).
  144. ------------------------------------------------------------
  145. SYNTAX: MAINTAINER
  146. DESCRIPTION: This command is reserved for use by the
  147. Bywater BASIC maintainer. It is not for the
  148. BASIC programmer.
  149. ------------------------------------------------------------
  150. SYNTAX: MAINTAINER CMDS
  151. DESCRIPTION: Syntax Error.
  152. ------------------------------------------------------------
  153. SYNTAX: MAINTAINER CMDS HTML
  154. DESCRIPTION: Dump COMMAND vs VERSION as HTML table
  155. ------------------------------------------------------------
  156. SYNTAX: MAINTAINER CMDS ID
  157. DESCRIPTION: Dump COMMAND #define.
  158. ------------------------------------------------------------
  159. SYNTAX: MAINTAINER CMDS MANUAL
  160. DESCRIPTION: Dump COMMAND manual.
  161. ------------------------------------------------------------
  162. SYNTAX: MAINTAINER CMDS_SWITCH
  163. DESCRIPTION: Dump COMMAND switch.
  164. ------------------------------------------------------------
  165. SYNTAX: MAINTAINER CMDS TABLE
  166. DESCRIPTION: Dump COMMAND table.
  167. ------------------------------------------------------------
  168. SYNTAX: MAINTAINER DEBUG
  169. DESCRIPTION: Syntax Error.
  170. ------------------------------------------------------------
  171. SYNTAX: MAINTAINER DEBUG OFF
  172. DESCRIPTION: Disable degug tracing.
  173. ------------------------------------------------------------
  174. SYNTAX: MAINTAINER DEBUG ON
  175. DESCRIPTION: Enable degug tracing.
  176. ------------------------------------------------------------
  177. SYNTAX: MAINTAINER FNCS
  178. DESCRIPTION: Syntax Error.
  179. ------------------------------------------------------------
  180. SYNTAX: MAINTAINER FNCS HTML
  181. DESCRIPTION: Dump FUNCTION vs VERSION as HTML table.
  182. ------------------------------------------------------------
  183. SYNTAX: MAINTAINER FNCS ID
  184. DESCRIPTION: Dump FUNCTION #define.
  185. ------------------------------------------------------------
  186. SYNTAX: MAINTAINER FNCS MANUAL
  187. DESCRIPTION: Dump FUNCTION manual.
  188. ------------------------------------------------------------
  189. SYNTAX: MAINTAINER FNCS SWITCH
  190. DESCRIPTION: Dump FUNCTION switch.
  191. ------------------------------------------------------------
  192. SYNTAX: MAINTAINER FNCS TABLE
  193. DESCRIPTION: Dump FUNCTION table.
  194. ------------------------------------------------------------
  195. SYNTAX: MAINTAINER MANUAL
  196. DESCRIPTION: Dump manual for the currently selected OPTION
  197. VERSION.
  198. ------------------------------------------------------------
  199. SYNTAX: MAINTAINER STACK
  200. DESCRIPTION: Dump the BASIC stack.
  201. ------------------------------------------------------------
  202. SYNTAX: NEW
  203. DESCRIPTION: Deletes the program in memory and clears all
  204. variables.
  205. ------------------------------------------------------------
  206. SYNTAX: NEXT [variable]
  207. DESCRIPTION: The bottom line of a FOR - NEXT structure.
  208. ------------------------------------------------------------
  209. SYNTAX: OF
  210. DESCRIPTION: Syntax Error.
  211. ------------------------------------------------------------
  212. SYNTAX: ON value GOSUB line [, ...]
  213. DESCRIPTION: Calls based on the rounded value.
  214. ------------------------------------------------------------
  215. SYNTAX: ON value GOTO line [, ...]
  216. DESCRIPTION: Branches based on the rounded value.
  217. ------------------------------------------------------------
  218. SYNTAX: OPTION
  219. DESCRIPTION: Syntax Error.
  220. ------------------------------------------------------------
  221. SYNTAX: OPTION ANGLE
  222. DESCRIPTION: Syntax Error.
  223. ------------------------------------------------------------
  224. SYNTAX: OPTION ANGLE DEGREES
  225. DESCRIPTION: Configures these math functions to accept and
  226. return angles in degrees: ACOS, ACS, ANGLE,
  227. ARCSIN, ASIN, ASN, ARCTAN, ATN, ATAN, COS,
  228. COT, CSC, SEC, SIN and TAN.
  229. ------------------------------------------------------------
  230. SYNTAX: OPTION ANGLE GRADIANS
  231. DESCRIPTION: Configures these math functions to accept and
  232. return angles in gradians: ACOS, ANGLE,
  233. ASIN, ASN, ATN, ATAN, COS, COT, CSC, SEC, SIN
  234. and TAN.
  235. ------------------------------------------------------------
  236. SYNTAX: OPTION ANGLE RADIANS
  237. DESCRIPTION: Configures these math functions to accept and
  238. return angles in radians: ACOS, ANGLE, ASIN,
  239. ASN, ATN, ATAN, COS, COT, CSC, SEC, SIN and
  240. TAN.
  241. ------------------------------------------------------------
  242. SYNTAX: OPTION ARITHMETIC
  243. DESCRIPTION: Syntax Error.
  244. ------------------------------------------------------------
  245. SYNTAX: OPTION ARITHMETIC DECIMAL
  246. DESCRIPTION: Currently has no effect.
  247. ------------------------------------------------------------
  248. SYNTAX: OPTION ARITHMETIC FIXED
  249. DESCRIPTION: Currently has no effect.
  250. ------------------------------------------------------------
  251. SYNTAX: OPTION ARITHMETIC NATIVE
  252. DESCRIPTION: Currently has no effect.
  253. ------------------------------------------------------------
  254. SYNTAX: OPTION BASE integer
  255. DESCRIPTION: Sets the default lowest array subscript.
  256. ------------------------------------------------------------
  257. SYNTAX: OPTION BUGS
  258. DESCRIPTION: Syntax Error.
  259. ------------------------------------------------------------
  260. SYNTAX: OPTION BUGS BOOLEAN
  261. DESCRIPTION: Boolean results are 1 or 0 instead of bitwise.
  262. ------------------------------------------------------------
  263. SYNTAX: OPTION BUGS OFF
  264. DESCRIPTION: Disables bugs commonly found in many BASIC
  265. dialects.
  266. ------------------------------------------------------------
  267. SYNTAX: OPTION BUGS ON
  268. DESCRIPTION: Enables bugs commonly found in many BASIC
  269. dialects.
  270. ------------------------------------------------------------
  271. SYNTAX: OPTION COMPARE
  272. DESCRIPTION: Syntax Error.
  273. ------------------------------------------------------------
  274. SYNTAX: OPTION COMPARE BINARY
  275. DESCRIPTION: Causes string comparisons to be
  276. case-sensitive.
  277. ------------------------------------------------------------
  278. SYNTAX: OPTION COMPARE DATABASE
  279. DESCRIPTION: Causes string comparisons to be
  280. case-insensitive.
  281. ------------------------------------------------------------
  282. SYNTAX: OPTION COMPARE TEXT
  283. DESCRIPTION: Causes string comparisons to be
  284. case-insensitive.
  285. ------------------------------------------------------------
  286. SYNTAX: OPTION COVERAGE
  287. DESCRIPTION: Syntax Error.
  288. ------------------------------------------------------------
  289. SYNTAX: OPTION COVERAGE OFF
  290. DESCRIPTION: Disables BASIC code coverage recording,
  291. displayed using the LIST command.
  292. ------------------------------------------------------------
  293. SYNTAX: OPTION COVERAGE ON
  294. DESCRIPTION: Enables BASIC code coverage recording,
  295. displayed using the LIST command.
  296. ------------------------------------------------------------
  297. SYNTAX: OPTION DATE format$
  298. DESCRIPTION: Sets the date format string used by C
  299. strftime() for DATE$.
  300. ------------------------------------------------------------
  301. SYNTAX: OPTION DIGITS integer
  302. DESCRIPTION: Sets the number of significant digits for
  303. PRINT. Setting the value to zero restores
  304. the default.
  305. ------------------------------------------------------------
  306. SYNTAX: OPTION DISABLE
  307. DESCRIPTION: Syntax Error.
  308. ------------------------------------------------------------
  309. SYNTAX: OPTION DISABLE COMMAND name$
  310. DESCRIPTION: Disables the specified BASIC command.
  311. ------------------------------------------------------------
  312. SYNTAX: OPTION DISABLE FUNCTION name$
  313. DESCRIPTION: Disables the specified BASIC function.
  314. ------------------------------------------------------------
  315. SYNTAX: OPTION DISABLE OPERATOR name$
  316. DESCRIPTION: Disables the specified BASIC operator.
  317. ------------------------------------------------------------
  318. SYNTAX: OPTION EDIT string$
  319. DESCRIPTION: Sets the program name used by the EDIT
  320. command.
  321. ------------------------------------------------------------
  322. SYNTAX: OPTION ENABLE
  323. DESCRIPTION: Syntax Error.
  324. ------------------------------------------------------------
  325. SYNTAX: OPTION ENABLE COMMAND name$
  326. DESCRIPTION: Enables the specified BASIC command.
  327. ------------------------------------------------------------
  328. SYNTAX: OPTION ENABLE FUNCTION name$
  329. DESCRIPTION: Enables the specified BASIC function.
  330. ------------------------------------------------------------
  331. SYNTAX: OPTION ENABLE OPERATOR name$
  332. DESCRIPTION: Enables the specified BASIC operator.
  333. ------------------------------------------------------------
  334. SYNTAX: OPTION ERROR
  335. DESCRIPTION: Syntax Error.
  336. ------------------------------------------------------------
  337. SYNTAX: OPTION ERROR GOSUB
  338. DESCRIPTION: When an error occurs, GOSUB to the error
  339. handler. The error handler exits with
  340. RETURN.
  341. ------------------------------------------------------------
  342. SYNTAX: OPTION ERROR GOTO
  343. DESCRIPTION: When an error occurs, GOTO to the error
  344. handler. The error handler exits with
  345. RESUME.
  346. ------------------------------------------------------------
  347. SYNTAX: OPTION EXPLICIT
  348. DESCRIPTION: All variables must be declared using DIM.
  349. ------------------------------------------------------------
  350. SYNTAX: OPTION EXTENSION string$
  351. DESCRIPTION: Sets the BASIC filename extension, commonly
  352. ".bas".
  353. ------------------------------------------------------------
  354. SYNTAX: OPTION FILES string$
  355. DESCRIPTION: Sets the program name used by the FILES
  356. command.
  357. ------------------------------------------------------------
  358. SYNTAX: OPTION IMPLICIT
  359. DESCRIPTION: Variables need not be declared using DIM,
  360. provided arrays have no more that 10
  361. elements. This is the opposite of OPTION
  362. EXPLICIT, and is the default for all versions
  363. of BASIC.
  364. ------------------------------------------------------------
  365. SYNTAX: OPTION INDENT integer
  366. DESCRIPTION: Sets indention level for LIST. Zero means no
  367. indention. Default is 2.
  368. ------------------------------------------------------------
  369. SYNTAX: OPTION LABELS
  370. DESCRIPTION: Syntax Error.
  371. ------------------------------------------------------------
  372. SYNTAX: OPTION LABELS OFF
  373. DESCRIPTION: Disables text labels.
  374. ------------------------------------------------------------
  375. SYNTAX: OPTION LABELS ON
  376. DESCRIPTION: Enables text labels.
  377. ------------------------------------------------------------
  378. SYNTAX: OPTION PROMPT string$
  379. DESCRIPTION: Sets the BASIC prompt.
  380. ------------------------------------------------------------
  381. SYNTAX: OPTION PUNCT
  382. DESCRIPTION: Syntax Error.
  383. ------------------------------------------------------------
  384. SYNTAX: OPTION PUNCT AT char$
  385. DESCRIPTION: Sets the PRINT AT character, commonly "@".
  386. ------------------------------------------------------------
  387. SYNTAX: OPTION PUNCT BYTE char$
  388. DESCRIPTION: Sets the suffix character that indicates a
  389. variable is of type BYTE, commonly "~".
  390. ------------------------------------------------------------
  391. SYNTAX: OPTION PUNCT COMMENT char$
  392. DESCRIPTION: Sets the shortcut COMMENT character.
  393. ------------------------------------------------------------
  394. SYNTAX: OPTION PUNCT CURRENCY char$
  395. DESCRIPTION: Sets the suffix character that indicates a
  396. variable is of type CURRENCY, commonly "@".
  397. ------------------------------------------------------------
  398. SYNTAX: OPTION PUNCT DOUBLE char$
  399. DESCRIPTION: Sets the suffix character that indicates a
  400. variable is of type DOUBLE, commonly "#".
  401. ------------------------------------------------------------
  402. SYNTAX: OPTION PUNCT FILENUM char$
  403. DESCRIPTION: Sets the FILE NUMBER prefix character,
  404. commonly "#".
  405. ------------------------------------------------------------
  406. SYNTAX: OPTION PUNCT IMAGE char$
  407. DESCRIPTION: Sets the shortcut IMAGE character, commonly
  408. ":".
  409. ------------------------------------------------------------
  410. SYNTAX: OPTION PUNCT INPUT char$
  411. DESCRIPTION: Sets the shortcut INPUT character, commonly
  412. "!".
  413. ------------------------------------------------------------
  414. SYNTAX: OPTION PUNCT INTEGER char$
  415. DESCRIPTION: Sets the suffix character that indicates a
  416. variable is of type INTEGER, commonly "%".
  417. ------------------------------------------------------------
  418. SYNTAX: OPTION PUNCT LONG char$
  419. DESCRIPTION: Sets the suffix character that indicates a
  420. variable is of type LONG, commonly "&".
  421. ------------------------------------------------------------
  422. SYNTAX: OPTION PUNCT LPAREN char$
  423. DESCRIPTION: Sets the LEFT PARENTHESIS character, commonly
  424. "(".
  425. ------------------------------------------------------------
  426. SYNTAX: OPTION PUNCT_PRINT char$
  427. DESCRIPTION: Sets the shortcut PRINT character, commonly
  428. "?".
  429. ------------------------------------------------------------
  430. SYNTAX: OPTION PUNCT QUOTE char$
  431. DESCRIPTION: Sets the QUOTE character, commonly """
  432. ------------------------------------------------------------
  433. SYNTAX: OPTION PUNCT RPAREN char$
  434. DESCRIPTION: Sets the RIGHT PARENTHESIS character, commonly
  435. ")".
  436. ------------------------------------------------------------
  437. SYNTAX: OPTION PUNCT SINGLE char$
  438. DESCRIPTION: Sets the suffix character that indicates a
  439. variable is of type SINGLE, commonly "!".
  440. ------------------------------------------------------------
  441. SYNTAX: OPTION PUNCT STATEMENT char$
  442. DESCRIPTION: Sets the statement seperator character,
  443. commonly ":".
  444. ------------------------------------------------------------
  445. SYNTAX: OPTION PUNCT STRING char$
  446. DESCRIPTION: Sets the suffix character that indicates a
  447. variable is of type STRING, commonly "$".
  448. ------------------------------------------------------------
  449. SYNTAX: OPTION RECLEN integer
  450. DESCRIPTION: Sets the default RANDOM record length.
  451. ------------------------------------------------------------
  452. SYNTAX: OPTION RENUM string$
  453. DESCRIPTION: Sets the program name used by the RENUM
  454. command.
  455. ------------------------------------------------------------
  456. SYNTAX: OPTION ROUND
  457. DESCRIPTION: Syntax Error.
  458. ------------------------------------------------------------
  459. SYNTAX: OPTION ROUND BANK
  460. DESCRIPTION: Round using the Banker rule.
  461. ------------------------------------------------------------
  462. SYNTAX: OPTION ROUND MATH
  463. DESCRIPTION: Round using mathematical rules.
  464. ------------------------------------------------------------
  465. SYNTAX: OPTION ROUND TRUNCATE
  466. DESCRIPTION: Round using truncation.
  467. ------------------------------------------------------------
  468. SYNTAX: OPTION SCALE integer
  469. DESCRIPTION: Sets the number of digits to round after the
  470. decimal point for PRINT. Setting the value
  471. to zero disables rounding.
  472. ------------------------------------------------------------
  473. SYNTAX: OPTION SLEEP double
  474. DESCRIPTION: Sets multiplier for SLEEP and WAIT. Zero
  475. means no waiting. Default is 1.
  476. ------------------------------------------------------------
  477. SYNTAX: OPTION STDERR filename$
  478. DESCRIPTION: Sets the file used for STDERR, which is used
  479. by LPRINT commands.
  480. ------------------------------------------------------------
  481. SYNTAX: OPTION STDIN filename$
  482. DESCRIPTION: Sets the file used for STDIN, which is used by
  483. INPUT commands.
  484. ------------------------------------------------------------
  485. SYNTAX: OPTION STDOUT filename$
  486. DESCRIPTION: Sets the file used for STDOUT, which is used
  487. by PRINT commands.
  488. ------------------------------------------------------------
  489. SYNTAX: OPTION STRICT
  490. DESCRIPTION: Syntax Error.
  491. ------------------------------------------------------------
  492. SYNTAX: OPTION STRICT OFF
  493. DESCRIPTION: Disables checking for implicit array creation
  494. without using the DIM command.
  495. ------------------------------------------------------------
  496. SYNTAX: OPTION STRICT ON
  497. DESCRIPTION: Enables checking for implicit array creation
  498. without using the DIM command.
  499. ------------------------------------------------------------
  500. SYNTAX: OPTION TERMINAL
  501. DESCRIPTION: Syntax Error.
  502. ------------------------------------------------------------
  503. SYNTAX: OPTION TERMINAL ADM
  504. DESCRIPTION: Enables ADM-3A terminal control codes for CLS,
  505. COLOR, and LOCATE.
  506. ------------------------------------------------------------
  507. SYNTAX: OPTION TERMINAL ANSI
  508. DESCRIPTION: Enables ANSI terminal control codes for CLS,
  509. COLOR, and LOCATE.
  510. ------------------------------------------------------------
  511. SYNTAX: OPTION TERMINAL NONE
  512. DESCRIPTION: Disables terminal control codes for CLS,
  513. COLOR, and LOCATE.
  514. ------------------------------------------------------------
  515. SYNTAX: OPTION TIME format$
  516. DESCRIPTION: Sets the time format string used by C
  517. strftime() for TIME$.
  518. ------------------------------------------------------------
  519. SYNTAX: OPTION TRACE
  520. DESCRIPTION: Syntax Error.
  521. ------------------------------------------------------------
  522. SYNTAX: OPTION TRACE OFF
  523. DESCRIPTION: Disables displaying a stack trace when an
  524. ERROR occurs.
  525. ------------------------------------------------------------
  526. SYNTAX: OPTION TRACE ON
  527. DESCRIPTION: Enables displaying a stack trace when an ERROR
  528. occurs.
  529. ------------------------------------------------------------
  530. SYNTAX: OPTION USING
  531. DESCRIPTION: Syntax Error.
  532. ------------------------------------------------------------
  533. SYNTAX: OPTION USING ALL char$
  534. DESCRIPTION: Specifies the magic ALL character for the
  535. PRINT USING command. A common value is "&".
  536. ------------------------------------------------------------
  537. SYNTAX: OPTION USING COMMA char$
  538. DESCRIPTION: Specifies the magic COMMA character for the
  539. PRINT USING command. A common value is ",".
  540. ------------------------------------------------------------
  541. SYNTAX: OPTION USING DIGIT char$
  542. DESCRIPTION: Specifies the magic DIGIT character for the
  543. PRINT USING command. A common value is "#".
  544. ------------------------------------------------------------
  545. SYNTAX: OPTION USING DOLLAR char$
  546. DESCRIPTION: Specifies the magic DOLLAR character for the
  547. PRINT USING command. A common value is "$".
  548. ------------------------------------------------------------
  549. SYNTAX: OPTION USING EXRAD char$
  550. DESCRIPTION: Specifies the magic EXRAD character for the
  551. PRINT USING command. A common value is "^".
  552. ------------------------------------------------------------
  553. SYNTAX: OPTION USING FILLER char$
  554. DESCRIPTION: Specifies the magic FILLER character for the
  555. PRINT USING command. A common value is "*".
  556. ------------------------------------------------------------
  557. SYNTAX: OPTION USING FIRST char$
  558. DESCRIPTION: Specifies the magic FIRST character for the
  559. PRINT USING command. A common value is "!".
  560. ------------------------------------------------------------
  561. SYNTAX: OPTION USING LENGTH char$
  562. DESCRIPTION: Specifies the magic LENGTH character for the
  563. PRINT USING command. A common value is "\".
  564. ------------------------------------------------------------
  565. SYNTAX: OPTION USING LITERAL char$
  566. DESCRIPTION: Specifies the magic LITERAL character for the
  567. PRINT USING command. A common value is "_".
  568. ------------------------------------------------------------
  569. SYNTAX: OPTION USING MINUS char$
  570. DESCRIPTION: Specifies the magic MINUS character for the
  571. PRINT USING command. A common value is "-".
  572. ------------------------------------------------------------
  573. SYNTAX: OPTION USING PERIOD char$
  574. DESCRIPTION: Specifies the magic PERIOD character for the
  575. PRINT USING command. A common value is ".".
  576. ------------------------------------------------------------
  577. SYNTAX: OPTION USING PLUS char$
  578. DESCRIPTION: Specifies the magic PLUS character for the
  579. PRINT USING command. A common value is "+".
  580. ------------------------------------------------------------
  581. SYNTAX: OPTION VERSION version$
  582. DESCRIPTION: Selects a specific BASIC version, which is a
  583. combination of OPTION settings, commands,
  584. functions and operators. If no version is
  585. specified, displays a list of the available
  586. versions.
  587. ------------------------------------------------------------
  588. SYNTAX: OPTION ZONE integer
  589. DESCRIPTION: Sets the PRINT zone width. Setting the value
  590. to zero restores the default.
  591. ------------------------------------------------------------
  592. SYNTAX: PRINT # filenum , [USING format$;] value ...
  593. DESCRIPTION: Sends output to a file.
  594. ------------------------------------------------------------
  595. SYNTAX: PRINT [USING format$;] value ...
  596. DESCRIPTION: Sends output to the screen.
  597. ------------------------------------------------------------
  598. SYNTAX: QUIT
  599. DESCRIPTION: Exits to the operating system.
  600. ------------------------------------------------------------
  601. SYNTAX: READ variable [, ...]
  602. DESCRIPTION: Reads values from DATA statements.
  603. ------------------------------------------------------------
  604. SYNTAX: REM ...
  605. DESCRIPTION: Remark.
  606. ------------------------------------------------------------
  607. SYNTAX: RESTORE [line]
  608. DESCRIPTION: Resets the line used for the next READ
  609. statement. line may be either a number or a
  610. label.
  611. ------------------------------------------------------------
  612. SYNTAX: RETURN
  613. DESCRIPTION: Concludes a subroutine called by GOSUB.
  614. ------------------------------------------------------------
  615. SYNTAX: RUN filename$
  616. DESCRIPTION: Loads a new BAASIC program and executes the
  617. program from the start.
  618. ------------------------------------------------------------
  619. SYNTAX: RUN line
  620. DESCRIPTION: Executes the program in memory beginning at
  621. line.
  622. ------------------------------------------------------------
  623. SYNTAX: RUN
  624. DESCRIPTION: Executes the program in memory from the start.
  625. ------------------------------------------------------------
  626. SYNTAX: SAVE [filename$]
  627. DESCRIPTION: Saves the current program into the file
  628. filename$ in ASCII format.
  629. ------------------------------------------------------------
  630. SYNTAX: STEP
  631. DESCRIPTION: Syntax Error.
  632. ------------------------------------------------------------
  633. SYNTAX: STOP
  634. DESCRIPTION: Interrupts program execution and displays the
  635. line number of the STOP command. For use
  636. when debugging BASIC programs. Whether STOP
  637. issues a SIGINT signal is implementation
  638. defined.
  639. ------------------------------------------------------------
  640. SYNTAX: SYSTEM
  641. DESCRIPTION: Exits to the operating system.
  642. ------------------------------------------------------------
  643. SYNTAX: THEN
  644. DESCRIPTION: Syntax Error.
  645. ------------------------------------------------------------
  646. SYNTAX: TO
  647. DESCRIPTION: Syntax Error.
  648. ------------------------------------------------------------
  649. ============================================================
  650. FUNCTIONS
  651. ============================================================
  652. ------------------------------------------------------------
  653. SYNTAX: N = ABS( X )
  654. PARAMETER: X is a number
  655. DESCRIPTION: The absolute value of X.
  656. ------------------------------------------------------------
  657. SYNTAX: N = ASC( A$ )
  658. PARAMETER: A$ is a string, LEN >= 1
  659. DESCRIPTION: The numeric code for the first letter in A$.
  660. For example, ASC("ABC") returns 65 on ASCII
  661. systems.
  662. ------------------------------------------------------------
  663. SYNTAX: N = ATN( X )
  664. PARAMETER: X is a number
  665. DESCRIPTION: The arctangent of X in radians, i.e. the angle
  666. whose tangent is X, where -PI/2 < ATN(X) <
  667. PI/2.
  668. ------------------------------------------------------------
  669. SYNTAX: S$ = CHR$( X )
  670. PARAMETER: X is a number, [0,255]
  671. DESCRIPTION: The one-character string with the character
  672. corresponding to the numeric code X. On
  673. ASCII systems, CHR$(65) returns "A".
  674. ------------------------------------------------------------
  675. SYNTAX: N = COS( X )
  676. PARAMETER: X is a number
  677. DESCRIPTION: The cosine of X, where X is in radians.
  678. ------------------------------------------------------------
  679. SYNTAX: N = EXP( X )
  680. PARAMETER: X is a number
  681. DESCRIPTION: The exponential value of X, i.e., the value of
  682. the base of natural logarithms (e = 2.71828)
  683. raised to the power of X; if EXP(X) is less
  684. that machine infinitesimal, then its value
  685. shall be replaced with zero.
  686. ------------------------------------------------------------
  687. SYNTAX: N = FIX( X )
  688. PARAMETER: X is a number
  689. DESCRIPTION: The truncated integer, part of X. FIX (X) is
  690. equivalent to SGN(X)*INT(ABS(X)). The major
  691. difference between FIX and INT is that FIX
  692. does not return the next lower number for
  693. negative X.
  694. ------------------------------------------------------------
  695. SYNTAX: N = INT( X )
  696. PARAMETER: X is a number
  697. DESCRIPTION: The largest integer not greater than X; e.g.
  698. INT(1.3) = 1 and INT(-1.3) = 2.
  699. ------------------------------------------------------------
  700. SYNTAX: N = LEN( A$ )
  701. PARAMETER: A$ is a string, LEN >= 0
  702. DESCRIPTION: The length of A$.
  703. ------------------------------------------------------------
  704. SYNTAX: N = LOG( X )
  705. PARAMETER: X is a number, > 0
  706. DESCRIPTION: The natural logarithm of X; X shall be greater
  707. than zero.
  708. ------------------------------------------------------------
  709. SYNTAX: S$ = NUM$( X )
  710. PARAMETER: X is a number
  711. DESCRIPTION: The string generated by the print-statement as
  712. the numeric-representation of the value
  713. associated with X.
  714. ------------------------------------------------------------
  715. SYNTAX: N = RANDOMIZE
  716. DESCRIPTION: Seeds the pseudo-random number generator with
  717. TIME.
  718. ------------------------------------------------------------
  719. SYNTAX: N = RANDOMIZE( X )
  720. PARAMETER: X is a number
  721. DESCRIPTION: Seeds the pseudo-random number generator with
  722. X.
  723. ------------------------------------------------------------
  724. SYNTAX: N = RND
  725. DESCRIPTION: The next pseudo-random number in an
  726. implementation-defined sequence of
  727. pseudo-random numbers uniformly distributed
  728. in the range 0 <= RND < 1.
  729. ------------------------------------------------------------
  730. SYNTAX: N = RND( X )
  731. PARAMETER: X is a number
  732. DESCRIPTION: Returns a pseudorandom number in the range
  733. [0,1]. The value of X is ignored.
  734. ------------------------------------------------------------
  735. SYNTAX: N = SGN( X )
  736. PARAMETER: X is a number
  737. DESCRIPTION: The sign of X: -1 if X < 0, 0 if X = 0, and +1
  738. if X > 0.
  739. ------------------------------------------------------------
  740. SYNTAX: N = SIN( X )
  741. PARAMETER: X is a number
  742. DESCRIPTION: The sine of X, where X is in radians.
  743. ------------------------------------------------------------
  744. SYNTAX: S$ = SPC( X )
  745. PARAMETER: X is a number
  746. DESCRIPTION: The string of X spaces. Only for use within
  747. the PRINT command.
  748. ------------------------------------------------------------
  749. SYNTAX: N = SQR( X )
  750. PARAMETER: X is a number, >= 0
  751. DESCRIPTION: The non-negative square root of X; X shall be
  752. non-negative.
  753. ------------------------------------------------------------
  754. SYNTAX: S$ = STR$( X )
  755. PARAMETER: X is a number
  756. DESCRIPTION: The string generated by the print-statement as
  757. the numeric-representation of the value
  758. associated with X.
  759. ------------------------------------------------------------
  760. SYNTAX: S$ = TAB( X )
  761. PARAMETER: X is a number
  762. DESCRIPTION: The string required to advance to column X.
  763. Only for use within the PRINT command.
  764. ------------------------------------------------------------
  765. SYNTAX: N = TAN( X )
  766. PARAMETER: X is a number
  767. DESCRIPTION: The tangent of X, where X is in radians.
  768. ------------------------------------------------------------
  769. SYNTAX: N = VAL( A$ )
  770. PARAMETER: A$ is a string, LEN >= 1
  771. DESCRIPTION: The value of the numeric-constant associated
  772. with A$, if the string associated with A$ is
  773. a numeric-constant. Leading and trailing
  774. spaces in the string are ignored. If the
  775. evaluation of the numeric-constant would
  776. result in a value which causes an underflow,
  777. then the value returned shall be zero. For
  778. example, VAL( " 123.5 " ) = 123.5, VAL(
  779. "2.E-99" ) could be zero, and VAL( "MCMXVII"
  780. ) causes an exception.
  781. ------------------------------------------------------------
  782. ============================================================
  783. OPERATORS
  784. ============================================================
  785. ------------------------------------------------------------
  786. SYNTAX: X ** Y
  787. DESCRIPTION: Exponential
  788. PRECEDENCE: 14
  789. ------------------------------------------------------------
  790. SYNTAX: X ^ Y
  791. DESCRIPTION: Exponential
  792. PRECEDENCE: 14
  793. ------------------------------------------------------------
  794. SYNTAX: + X
  795. DESCRIPTION: Posation
  796. PRECEDENCE: 13
  797. ------------------------------------------------------------
  798. SYNTAX: - X
  799. DESCRIPTION: Negation
  800. PRECEDENCE: 13
  801. ------------------------------------------------------------
  802. SYNTAX: X * Y
  803. DESCRIPTION: Multiplication
  804. PRECEDENCE: 12
  805. ------------------------------------------------------------
  806. SYNTAX: X / Y
  807. DESCRIPTION: Division
  808. PRECEDENCE: 12
  809. ------------------------------------------------------------
  810. SYNTAX: X \ Y
  811. DESCRIPTION: Integer Division
  812. PRECEDENCE: 11
  813. ------------------------------------------------------------
  814. SYNTAX: X + Y
  815. DESCRIPTION: Addition
  816. PRECEDENCE: 9
  817. ------------------------------------------------------------
  818. SYNTAX: X - Y
  819. DESCRIPTION: Subtraction
  820. PRECEDENCE: 9
  821. ------------------------------------------------------------
  822. SYNTAX: X < Y
  823. DESCRIPTION: Less than
  824. PRECEDENCE: 7
  825. ------------------------------------------------------------
  826. SYNTAX: X <= Y
  827. DESCRIPTION: Less than or Equal
  828. PRECEDENCE: 7
  829. ------------------------------------------------------------
  830. SYNTAX: X <> Y
  831. DESCRIPTION: Not Equal
  832. PRECEDENCE: 7
  833. ------------------------------------------------------------
  834. SYNTAX: X = Y
  835. DESCRIPTION: Equal
  836. PRECEDENCE: 7
  837. ------------------------------------------------------------
  838. SYNTAX: X =< Y
  839. DESCRIPTION: Less than or Equal
  840. PRECEDENCE: 7
  841. ------------------------------------------------------------
  842. SYNTAX: X => Y
  843. DESCRIPTION: Greater than or Equal
  844. PRECEDENCE: 7
  845. ------------------------------------------------------------
  846. SYNTAX: X > Y
  847. DESCRIPTION: Greater than
  848. PRECEDENCE: 7
  849. ------------------------------------------------------------
  850. SYNTAX: X >< Y
  851. DESCRIPTION: Not Equal
  852. PRECEDENCE: 7
  853. ------------------------------------------------------------
  854. SYNTAX: X >= Y
  855. DESCRIPTION: Greater than or Equal
  856. PRECEDENCE: 7
  857. ------------------------------------------------------------