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.
 
 
 
 
 
 

1090 lines
45 KiB

  1. ============================================================
  2. GENERAL
  3. ============================================================
  4. OPTION VERSION "SYSTEM/360"
  5. REM INTERNAL ID: I70
  6. REM DESCRIPTION: IBM System/360 Mainframe BASIC
  7. REM REFERENCE: BASIC Language Reference Manual
  8. REM by International Business Machines Corporation
  9. REM (c) 1970, International Business Machines Corporation
  10. REM http://bitsavers.org/pdf/ibm/360/os/tso/
  11. REM GC28-6837-0_BASIC_Language_Ref_Man_Jun70.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 1
  23. OPTION RECLEN 0
  24. OPTION DATE "%Y/%m/%d"
  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: CHAIN filename$ [, linenumber]
  60. DESCRIPTION: Load and execute another BASIC program,
  61. without clearing common variables. For
  62. System/370, the syntax is CHAIN
  63. filename$,parameter$.
  64. ------------------------------------------------------------
  65. SYNTAX: CLOSE
  66. DESCRIPTION: Closes all files.
  67. ------------------------------------------------------------
  68. SYNTAX: CLOSE filename$ [, ...]
  69. DESCRIPTION: Closes a file.
  70. ------------------------------------------------------------
  71. SYNTAX: CLOSE filenumber [, ...]
  72. DESCRIPTION: Closes a file.
  73. ------------------------------------------------------------
  74. SYNTAX: DATA constant [, ...]
  75. DESCRIPTION: Stores numeric and string constants to be
  76. accessed by READ.
  77. ------------------------------------------------------------
  78. SYNTAX: DEF FNname[( arg [,...] )] = value
  79. DESCRIPTION: Defines a single-line function. Single-line
  80. functions require an equal sign.
  81. ------------------------------------------------------------
  82. SYNTAX: DEF FNname[( arg [,...] )]
  83. DESCRIPTION: Defines a multiline function. Multi-line DEF
  84. functions do not have an equal sign and must
  85. end with FNEND.
  86. ------------------------------------------------------------
  87. SYNTAX: DIM [# filenum,] variable([ lower TO ] upper)
  88. DESCRIPTION: Declares variables and specifies the
  89. dimensions of array variables. For array
  90. variables, if the lower bound is not
  91. provided, then the OPTION BASE value is used.
  92. If filenum is provided, then the variable is
  93. virtual.
  94. ------------------------------------------------------------
  95. SYNTAX: EDIT
  96. DESCRIPTION: implementation defined.
  97. ------------------------------------------------------------
  98. SYNTAX: END
  99. DESCRIPTION: Terminates program execution. If the BASIC
  100. program was executed from the operating
  101. system level, then control returns to the
  102. operating system, oterwise control reuturns
  103. to the BASIC prompt.
  104. ------------------------------------------------------------
  105. SYNTAX: FNEND
  106. DESCRIPTION: Specifies the last line of a multi-line DEF
  107. function.
  108. ------------------------------------------------------------
  109. SYNTAX: FOR variable = start TO finish [STEP
  110. increment]
  111. DESCRIPTION: Top of a FOR - NEXT structure. The loop will
  112. continue a fixed number of times, which is
  113. determined by the values of start, finish,
  114. and increment.
  115. ------------------------------------------------------------
  116. SYNTAX: GET filename$ , scalar [, ...]
  117. DESCRIPTION: Gets one (or more) values from a file.
  118. ------------------------------------------------------------
  119. SYNTAX: GO
  120. DESCRIPTION: Syntax Error.
  121. ------------------------------------------------------------
  122. SYNTAX: GO SUB line
  123. DESCRIPTION: Initiates a subroutine call to the line
  124. specified. The subroutine must end with
  125. RETURN. The line may be a number or a label.
  126. ------------------------------------------------------------
  127. SYNTAX: GO TO line
  128. DESCRIPTION: Branches program execution to the specified
  129. line. The line may be a number or a label.
  130. ------------------------------------------------------------
  131. SYNTAX: GOSUB line
  132. DESCRIPTION: Initiates a subroutine call to the line
  133. specified. The subroutine must end with
  134. RETURN. The line may be a number or a label.
  135. ------------------------------------------------------------
  136. SYNTAX: GOTO line
  137. DESCRIPTION: Branches program execution to the specified
  138. line. The line may be a number or a label.
  139. ------------------------------------------------------------
  140. SYNTAX: IF value THEN line1 [ELSE line2]
  141. DESCRIPTION: Single line standard IF command. If the value
  142. is non-zero, then branh to line1. If the
  143. value is zero and ELSE is provided, then
  144. branch to line2. Otherwise continue to the
  145. next line. LABELS are not allowed.
  146. ------------------------------------------------------------
  147. SYNTAX: IMAGE "format string"
  148. DESCRIPTION: Provides format string for PRINT USING
  149. linenum.
  150. ------------------------------------------------------------
  151. SYNTAX: INPUT "prompt string" , variable [, ...]
  152. DESCRIPTION: Reads input from the terminal after displaying
  153. a prompt.
  154. ------------------------------------------------------------
  155. SYNTAX: INPUT # filenum , variable [, ...]s
  156. DESCRIPTION: Reads input from the file specified by
  157. filenum.
  158. ------------------------------------------------------------
  159. SYNTAX: INPUT variable [, ...]
  160. DESCRIPTION: Reads input from the terminal.
  161. ------------------------------------------------------------
  162. SYNTAX: [LET] variable [, ...] = value
  163. DESCRIPTION: Assigns the value to the variable. The LET
  164. keyword is optional.
  165. ------------------------------------------------------------
  166. SYNTAX: LIST line1 [- line2]
  167. DESCRIPTION: Lists BASIC program lines from line1 to line2
  168. to the console on stdout.
  169. ------------------------------------------------------------
  170. SYNTAX: LISTNH line1 [- line2]
  171. DESCRIPTION: Lists BASIC program lines from line1 to line2
  172. to the console on stdout.
  173. ------------------------------------------------------------
  174. SYNTAX: LOAD [filename$]
  175. DESCRIPTION: Loads an ASCII BASIC program into memory.
  176. ------------------------------------------------------------
  177. SYNTAX: LPRINT [USING format-string$;] value ...
  178. DESCRIPTION: Send output to the printer (stderr).
  179. ------------------------------------------------------------
  180. SYNTAX: MAINTAINER
  181. DESCRIPTION: This command is reserved for use by the
  182. Bywater BASIC maintainer. It is not for the
  183. BASIC programmer.
  184. ------------------------------------------------------------
  185. SYNTAX: MAINTAINER CMDS
  186. DESCRIPTION: Syntax Error.
  187. ------------------------------------------------------------
  188. SYNTAX: MAINTAINER CMDS HTML
  189. DESCRIPTION: Dump COMMAND vs VERSION as HTML table
  190. ------------------------------------------------------------
  191. SYNTAX: MAINTAINER CMDS ID
  192. DESCRIPTION: Dump COMMAND #define.
  193. ------------------------------------------------------------
  194. SYNTAX: MAINTAINER CMDS MANUAL
  195. DESCRIPTION: Dump COMMAND manual.
  196. ------------------------------------------------------------
  197. SYNTAX: MAINTAINER CMDS_SWITCH
  198. DESCRIPTION: Dump COMMAND switch.
  199. ------------------------------------------------------------
  200. SYNTAX: MAINTAINER CMDS TABLE
  201. DESCRIPTION: Dump COMMAND table.
  202. ------------------------------------------------------------
  203. SYNTAX: MAINTAINER DEBUG
  204. DESCRIPTION: Syntax Error.
  205. ------------------------------------------------------------
  206. SYNTAX: MAINTAINER DEBUG OFF
  207. DESCRIPTION: Disable degug tracing.
  208. ------------------------------------------------------------
  209. SYNTAX: MAINTAINER DEBUG ON
  210. DESCRIPTION: Enable degug tracing.
  211. ------------------------------------------------------------
  212. SYNTAX: MAINTAINER FNCS
  213. DESCRIPTION: Syntax Error.
  214. ------------------------------------------------------------
  215. SYNTAX: MAINTAINER FNCS HTML
  216. DESCRIPTION: Dump FUNCTION vs VERSION as HTML table.
  217. ------------------------------------------------------------
  218. SYNTAX: MAINTAINER FNCS ID
  219. DESCRIPTION: Dump FUNCTION #define.
  220. ------------------------------------------------------------
  221. SYNTAX: MAINTAINER FNCS MANUAL
  222. DESCRIPTION: Dump FUNCTION manual.
  223. ------------------------------------------------------------
  224. SYNTAX: MAINTAINER FNCS SWITCH
  225. DESCRIPTION: Dump FUNCTION switch.
  226. ------------------------------------------------------------
  227. SYNTAX: MAINTAINER FNCS TABLE
  228. DESCRIPTION: Dump FUNCTION table.
  229. ------------------------------------------------------------
  230. SYNTAX: MAINTAINER MANUAL
  231. DESCRIPTION: Dump manual for the currently selected OPTION
  232. VERSION.
  233. ------------------------------------------------------------
  234. SYNTAX: MAINTAINER STACK
  235. DESCRIPTION: Dump the BASIC stack.
  236. ------------------------------------------------------------
  237. SYNTAX: MAT arrayname = value
  238. DESCRIPTION: Matrix operations:
  239. MAT A = CON
  240. MAT A = IDN
  241. MAT A = ZER
  242. MAT A = INV B
  243. MAT A = TRN B
  244. MAT A = (k) * B
  245. MAT A = B
  246. MAT A = B + C
  247. MAT A = B - C
  248. MAT A = B * C
  249. ------------------------------------------------------------
  250. SYNTAX: MAT GET filename$, arrayname
  251. DESCRIPTION: Matrix get.
  252. ------------------------------------------------------------
  253. SYNTAX: MAT INPUT arrayname
  254. DESCRIPTION: Matrix input.
  255. ------------------------------------------------------------
  256. SYNTAX: MAT PRINT arrayname
  257. DESCRIPTION: Matrix print.
  258. ------------------------------------------------------------
  259. SYNTAX: MAT PUT filename$, arrayname
  260. DESCRIPTION: Matrix put.
  261. ------------------------------------------------------------
  262. SYNTAX: MAT READ arrayname
  263. DESCRIPTION: Matrix read.
  264. ------------------------------------------------------------
  265. SYNTAX: NEW
  266. DESCRIPTION: Deletes the program in memory and clears all
  267. variables.
  268. ------------------------------------------------------------
  269. SYNTAX: NEXT [variable]
  270. DESCRIPTION: The bottom line of a FOR - NEXT structure.
  271. ------------------------------------------------------------
  272. SYNTAX: OF
  273. DESCRIPTION: Syntax Error.
  274. ------------------------------------------------------------
  275. SYNTAX: ON value GOSUB line [, ...]
  276. DESCRIPTION: Calls based on the rounded value.
  277. ------------------------------------------------------------
  278. SYNTAX: ON value GOTO line [, ...]
  279. DESCRIPTION: Branches based on the rounded value.
  280. ------------------------------------------------------------
  281. SYNTAX: OPEN filenumber,
  282. filename$,
  283. INPUT|OUTPUT|APPEND|VIRTUAL
  284. DESCRIPTION: Opens a file for use.
  285. ------------------------------------------------------------
  286. SYNTAX: OPTION
  287. DESCRIPTION: Syntax Error.
  288. ------------------------------------------------------------
  289. SYNTAX: OPTION ANGLE
  290. DESCRIPTION: Syntax Error.
  291. ------------------------------------------------------------
  292. SYNTAX: OPTION ANGLE DEGREES
  293. DESCRIPTION: Configures these math functions to accept and
  294. return angles in degrees: ACOS, ACS, ANGLE,
  295. ARCSIN, ASIN, ASN, ARCTAN, ATN, ATAN, COS,
  296. COT, CSC, SEC, SIN and TAN.
  297. ------------------------------------------------------------
  298. SYNTAX: OPTION ANGLE GRADIANS
  299. DESCRIPTION: Configures these math functions to accept and
  300. return angles in gradians: ACOS, ANGLE,
  301. ASIN, ASN, ATN, ATAN, COS, COT, CSC, SEC, SIN
  302. and TAN.
  303. ------------------------------------------------------------
  304. SYNTAX: OPTION ANGLE RADIANS
  305. DESCRIPTION: Configures these math functions to accept and
  306. return angles in radians: ACOS, ANGLE, ASIN,
  307. ASN, ATN, ATAN, COS, COT, CSC, SEC, SIN and
  308. TAN.
  309. ------------------------------------------------------------
  310. SYNTAX: OPTION ARITHMETIC
  311. DESCRIPTION: Syntax Error.
  312. ------------------------------------------------------------
  313. SYNTAX: OPTION ARITHMETIC DECIMAL
  314. DESCRIPTION: Currently has no effect.
  315. ------------------------------------------------------------
  316. SYNTAX: OPTION ARITHMETIC FIXED
  317. DESCRIPTION: Currently has no effect.
  318. ------------------------------------------------------------
  319. SYNTAX: OPTION ARITHMETIC NATIVE
  320. DESCRIPTION: Currently has no effect.
  321. ------------------------------------------------------------
  322. SYNTAX: OPTION BASE integer
  323. DESCRIPTION: Sets the default lowest array subscript.
  324. ------------------------------------------------------------
  325. SYNTAX: OPTION BUGS
  326. DESCRIPTION: Syntax Error.
  327. ------------------------------------------------------------
  328. SYNTAX: OPTION BUGS BOOLEAN
  329. DESCRIPTION: Boolean results are 1 or 0 instead of bitwise.
  330. ------------------------------------------------------------
  331. SYNTAX: OPTION BUGS OFF
  332. DESCRIPTION: Disables bugs commonly found in many BASIC
  333. dialects.
  334. ------------------------------------------------------------
  335. SYNTAX: OPTION BUGS ON
  336. DESCRIPTION: Enables bugs commonly found in many BASIC
  337. dialects.
  338. ------------------------------------------------------------
  339. SYNTAX: OPTION COMPARE
  340. DESCRIPTION: Syntax Error.
  341. ------------------------------------------------------------
  342. SYNTAX: OPTION COMPARE BINARY
  343. DESCRIPTION: Causes string comparisons to be
  344. case-sensitive.
  345. ------------------------------------------------------------
  346. SYNTAX: OPTION COMPARE DATABASE
  347. DESCRIPTION: Causes string comparisons to be
  348. case-insensitive.
  349. ------------------------------------------------------------
  350. SYNTAX: OPTION COMPARE TEXT
  351. DESCRIPTION: Causes string comparisons to be
  352. case-insensitive.
  353. ------------------------------------------------------------
  354. SYNTAX: OPTION COVERAGE
  355. DESCRIPTION: Syntax Error.
  356. ------------------------------------------------------------
  357. SYNTAX: OPTION COVERAGE OFF
  358. DESCRIPTION: Disables BASIC code coverage recording,
  359. displayed using the LIST command.
  360. ------------------------------------------------------------
  361. SYNTAX: OPTION COVERAGE ON
  362. DESCRIPTION: Enables BASIC code coverage recording,
  363. displayed using the LIST command.
  364. ------------------------------------------------------------
  365. SYNTAX: OPTION DATE format$
  366. DESCRIPTION: Sets the date format string used by C
  367. strftime() for DATE$.
  368. ------------------------------------------------------------
  369. SYNTAX: OPTION DIGITS integer
  370. DESCRIPTION: Sets the number of significant digits for
  371. PRINT. Setting the value to zero restores
  372. the default.
  373. ------------------------------------------------------------
  374. SYNTAX: OPTION DISABLE
  375. DESCRIPTION: Syntax Error.
  376. ------------------------------------------------------------
  377. SYNTAX: OPTION DISABLE COMMAND name$
  378. DESCRIPTION: Disables the specified BASIC command.
  379. ------------------------------------------------------------
  380. SYNTAX: OPTION DISABLE FUNCTION name$
  381. DESCRIPTION: Disables the specified BASIC function.
  382. ------------------------------------------------------------
  383. SYNTAX: OPTION DISABLE OPERATOR name$
  384. DESCRIPTION: Disables the specified BASIC operator.
  385. ------------------------------------------------------------
  386. SYNTAX: OPTION EDIT string$
  387. DESCRIPTION: Sets the program name used by the EDIT
  388. command.
  389. ------------------------------------------------------------
  390. SYNTAX: OPTION ENABLE
  391. DESCRIPTION: Syntax Error.
  392. ------------------------------------------------------------
  393. SYNTAX: OPTION ENABLE COMMAND name$
  394. DESCRIPTION: Enables the specified BASIC command.
  395. ------------------------------------------------------------
  396. SYNTAX: OPTION ENABLE FUNCTION name$
  397. DESCRIPTION: Enables the specified BASIC function.
  398. ------------------------------------------------------------
  399. SYNTAX: OPTION ENABLE OPERATOR name$
  400. DESCRIPTION: Enables the specified BASIC operator.
  401. ------------------------------------------------------------
  402. SYNTAX: OPTION ERROR
  403. DESCRIPTION: Syntax Error.
  404. ------------------------------------------------------------
  405. SYNTAX: OPTION ERROR GOSUB
  406. DESCRIPTION: When an error occurs, GOSUB to the error
  407. handler. The error handler exits with
  408. RETURN.
  409. ------------------------------------------------------------
  410. SYNTAX: OPTION ERROR GOTO
  411. DESCRIPTION: When an error occurs, GOTO to the error
  412. handler. The error handler exits with
  413. RESUME.
  414. ------------------------------------------------------------
  415. SYNTAX: OPTION EXPLICIT
  416. DESCRIPTION: All variables must be declared using DIM.
  417. ------------------------------------------------------------
  418. SYNTAX: OPTION EXTENSION string$
  419. DESCRIPTION: Sets the BASIC filename extension, commonly
  420. ".bas".
  421. ------------------------------------------------------------
  422. SYNTAX: OPTION FILES string$
  423. DESCRIPTION: Sets the program name used by the FILES
  424. command.
  425. ------------------------------------------------------------
  426. SYNTAX: OPTION IMPLICIT
  427. DESCRIPTION: Variables need not be declared using DIM,
  428. provided arrays have no more that 10
  429. elements. This is the opposite of OPTION
  430. EXPLICIT, and is the default for all versions
  431. of BASIC.
  432. ------------------------------------------------------------
  433. SYNTAX: OPTION INDENT integer
  434. DESCRIPTION: Sets indention level for LIST. Zero means no
  435. indention. Default is 2.
  436. ------------------------------------------------------------
  437. SYNTAX: OPTION LABELS
  438. DESCRIPTION: Syntax Error.
  439. ------------------------------------------------------------
  440. SYNTAX: OPTION LABELS OFF
  441. DESCRIPTION: Disables text labels.
  442. ------------------------------------------------------------
  443. SYNTAX: OPTION LABELS ON
  444. DESCRIPTION: Enables text labels.
  445. ------------------------------------------------------------
  446. SYNTAX: OPTION PROMPT string$
  447. DESCRIPTION: Sets the BASIC prompt.
  448. ------------------------------------------------------------
  449. SYNTAX: OPTION PUNCT
  450. DESCRIPTION: Syntax Error.
  451. ------------------------------------------------------------
  452. SYNTAX: OPTION PUNCT AT char$
  453. DESCRIPTION: Sets the PRINT AT character, commonly "@".
  454. ------------------------------------------------------------
  455. SYNTAX: OPTION PUNCT BYTE char$
  456. DESCRIPTION: Sets the suffix character that indicates a
  457. variable is of type BYTE, commonly "~".
  458. ------------------------------------------------------------
  459. SYNTAX: OPTION PUNCT COMMENT char$
  460. DESCRIPTION: Sets the shortcut COMMENT character.
  461. ------------------------------------------------------------
  462. SYNTAX: OPTION PUNCT CURRENCY char$
  463. DESCRIPTION: Sets the suffix character that indicates a
  464. variable is of type CURRENCY, commonly "@".
  465. ------------------------------------------------------------
  466. SYNTAX: OPTION PUNCT DOUBLE char$
  467. DESCRIPTION: Sets the suffix character that indicates a
  468. variable is of type DOUBLE, commonly "#".
  469. ------------------------------------------------------------
  470. SYNTAX: OPTION PUNCT FILENUM char$
  471. DESCRIPTION: Sets the FILE NUMBER prefix character,
  472. commonly "#".
  473. ------------------------------------------------------------
  474. SYNTAX: OPTION PUNCT IMAGE char$
  475. DESCRIPTION: Sets the shortcut IMAGE character, commonly
  476. ":".
  477. ------------------------------------------------------------
  478. SYNTAX: OPTION PUNCT INPUT char$
  479. DESCRIPTION: Sets the shortcut INPUT character, commonly
  480. "!".
  481. ------------------------------------------------------------
  482. SYNTAX: OPTION PUNCT INTEGER char$
  483. DESCRIPTION: Sets the suffix character that indicates a
  484. variable is of type INTEGER, commonly "%".
  485. ------------------------------------------------------------
  486. SYNTAX: OPTION PUNCT LONG char$
  487. DESCRIPTION: Sets the suffix character that indicates a
  488. variable is of type LONG, commonly "&".
  489. ------------------------------------------------------------
  490. SYNTAX: OPTION PUNCT LPAREN char$
  491. DESCRIPTION: Sets the LEFT PARENTHESIS character, commonly
  492. "(".
  493. ------------------------------------------------------------
  494. SYNTAX: OPTION PUNCT_PRINT char$
  495. DESCRIPTION: Sets the shortcut PRINT character, commonly
  496. "?".
  497. ------------------------------------------------------------
  498. SYNTAX: OPTION PUNCT QUOTE char$
  499. DESCRIPTION: Sets the QUOTE character, commonly """
  500. ------------------------------------------------------------
  501. SYNTAX: OPTION PUNCT RPAREN char$
  502. DESCRIPTION: Sets the RIGHT PARENTHESIS character, commonly
  503. ")".
  504. ------------------------------------------------------------
  505. SYNTAX: OPTION PUNCT SINGLE char$
  506. DESCRIPTION: Sets the suffix character that indicates a
  507. variable is of type SINGLE, commonly "!".
  508. ------------------------------------------------------------
  509. SYNTAX: OPTION PUNCT STATEMENT char$
  510. DESCRIPTION: Sets the statement seperator character,
  511. commonly ":".
  512. ------------------------------------------------------------
  513. SYNTAX: OPTION PUNCT STRING char$
  514. DESCRIPTION: Sets the suffix character that indicates a
  515. variable is of type STRING, commonly "$".
  516. ------------------------------------------------------------
  517. SYNTAX: OPTION RECLEN integer
  518. DESCRIPTION: Sets the default RANDOM record length.
  519. ------------------------------------------------------------
  520. SYNTAX: OPTION RENUM string$
  521. DESCRIPTION: Sets the program name used by the RENUM
  522. command.
  523. ------------------------------------------------------------
  524. SYNTAX: OPTION ROUND
  525. DESCRIPTION: Syntax Error.
  526. ------------------------------------------------------------
  527. SYNTAX: OPTION ROUND BANK
  528. DESCRIPTION: Round using the Banker rule.
  529. ------------------------------------------------------------
  530. SYNTAX: OPTION ROUND MATH
  531. DESCRIPTION: Round using mathematical rules.
  532. ------------------------------------------------------------
  533. SYNTAX: OPTION ROUND TRUNCATE
  534. DESCRIPTION: Round using truncation.
  535. ------------------------------------------------------------
  536. SYNTAX: OPTION SCALE integer
  537. DESCRIPTION: Sets the number of digits to round after the
  538. decimal point for PRINT. Setting the value
  539. to zero disables rounding.
  540. ------------------------------------------------------------
  541. SYNTAX: OPTION SLEEP double
  542. DESCRIPTION: Sets multiplier for SLEEP and WAIT. Zero
  543. means no waiting. Default is 1.
  544. ------------------------------------------------------------
  545. SYNTAX: OPTION STDERR filename$
  546. DESCRIPTION: Sets the file used for STDERR, which is used
  547. by LPRINT commands.
  548. ------------------------------------------------------------
  549. SYNTAX: OPTION STDIN filename$
  550. DESCRIPTION: Sets the file used for STDIN, which is used by
  551. INPUT commands.
  552. ------------------------------------------------------------
  553. SYNTAX: OPTION STDOUT filename$
  554. DESCRIPTION: Sets the file used for STDOUT, which is used
  555. by PRINT commands.
  556. ------------------------------------------------------------
  557. SYNTAX: OPTION STRICT
  558. DESCRIPTION: Syntax Error.
  559. ------------------------------------------------------------
  560. SYNTAX: OPTION STRICT OFF
  561. DESCRIPTION: Disables checking for implicit array creation
  562. without using the DIM command.
  563. ------------------------------------------------------------
  564. SYNTAX: OPTION STRICT ON
  565. DESCRIPTION: Enables checking for implicit array creation
  566. without using the DIM command.
  567. ------------------------------------------------------------
  568. SYNTAX: OPTION TERMINAL
  569. DESCRIPTION: Syntax Error.
  570. ------------------------------------------------------------
  571. SYNTAX: OPTION TERMINAL ADM
  572. DESCRIPTION: Enables ADM-3A terminal control codes for CLS,
  573. COLOR, and LOCATE.
  574. ------------------------------------------------------------
  575. SYNTAX: OPTION TERMINAL ANSI
  576. DESCRIPTION: Enables ANSI terminal control codes for CLS,
  577. COLOR, and LOCATE.
  578. ------------------------------------------------------------
  579. SYNTAX: OPTION TERMINAL NONE
  580. DESCRIPTION: Disables terminal control codes for CLS,
  581. COLOR, and LOCATE.
  582. ------------------------------------------------------------
  583. SYNTAX: OPTION TIME format$
  584. DESCRIPTION: Sets the time format string used by C
  585. strftime() for TIME$.
  586. ------------------------------------------------------------
  587. SYNTAX: OPTION TRACE
  588. DESCRIPTION: Syntax Error.
  589. ------------------------------------------------------------
  590. SYNTAX: OPTION TRACE OFF
  591. DESCRIPTION: Disables displaying a stack trace when an
  592. ERROR occurs.
  593. ------------------------------------------------------------
  594. SYNTAX: OPTION TRACE ON
  595. DESCRIPTION: Enables displaying a stack trace when an ERROR
  596. occurs.
  597. ------------------------------------------------------------
  598. SYNTAX: OPTION USING
  599. DESCRIPTION: Syntax Error.
  600. ------------------------------------------------------------
  601. SYNTAX: OPTION USING ALL char$
  602. DESCRIPTION: Specifies the magic ALL character for the
  603. PRINT USING command. A common value is "&".
  604. ------------------------------------------------------------
  605. SYNTAX: OPTION USING COMMA char$
  606. DESCRIPTION: Specifies the magic COMMA character for the
  607. PRINT USING command. A common value is ",".
  608. ------------------------------------------------------------
  609. SYNTAX: OPTION USING DIGIT char$
  610. DESCRIPTION: Specifies the magic DIGIT character for the
  611. PRINT USING command. A common value is "#".
  612. ------------------------------------------------------------
  613. SYNTAX: OPTION USING DOLLAR char$
  614. DESCRIPTION: Specifies the magic DOLLAR character for the
  615. PRINT USING command. A common value is "$".
  616. ------------------------------------------------------------
  617. SYNTAX: OPTION USING EXRAD char$
  618. DESCRIPTION: Specifies the magic EXRAD character for the
  619. PRINT USING command. A common value is "^".
  620. ------------------------------------------------------------
  621. SYNTAX: OPTION USING FILLER char$
  622. DESCRIPTION: Specifies the magic FILLER character for the
  623. PRINT USING command. A common value is "*".
  624. ------------------------------------------------------------
  625. SYNTAX: OPTION USING FIRST char$
  626. DESCRIPTION: Specifies the magic FIRST character for the
  627. PRINT USING command. A common value is "!".
  628. ------------------------------------------------------------
  629. SYNTAX: OPTION USING LENGTH char$
  630. DESCRIPTION: Specifies the magic LENGTH character for the
  631. PRINT USING command. A common value is "\".
  632. ------------------------------------------------------------
  633. SYNTAX: OPTION USING LITERAL char$
  634. DESCRIPTION: Specifies the magic LITERAL character for the
  635. PRINT USING command. A common value is "_".
  636. ------------------------------------------------------------
  637. SYNTAX: OPTION USING MINUS char$
  638. DESCRIPTION: Specifies the magic MINUS character for the
  639. PRINT USING command. A common value is "-".
  640. ------------------------------------------------------------
  641. SYNTAX: OPTION USING PERIOD char$
  642. DESCRIPTION: Specifies the magic PERIOD character for the
  643. PRINT USING command. A common value is ".".
  644. ------------------------------------------------------------
  645. SYNTAX: OPTION USING PLUS char$
  646. DESCRIPTION: Specifies the magic PLUS character for the
  647. PRINT USING command. A common value is "+".
  648. ------------------------------------------------------------
  649. SYNTAX: OPTION VERSION version$
  650. DESCRIPTION: Selects a specific BASIC version, which is a
  651. combination of OPTION settings, commands,
  652. functions and operators. If no version is
  653. specified, displays a list of the available
  654. versions.
  655. ------------------------------------------------------------
  656. SYNTAX: OPTION ZONE integer
  657. DESCRIPTION: Sets the PRINT zone width. Setting the value
  658. to zero restores the default.
  659. ------------------------------------------------------------
  660. SYNTAX: PAUSE [comment]
  661. DESCRIPTION: Pauses processing until the ENTER key is
  662. presseed.
  663. ------------------------------------------------------------
  664. SYNTAX: PRINT # filenum , [USING format$;] value ...
  665. DESCRIPTION: Sends output to a file.
  666. ------------------------------------------------------------
  667. SYNTAX: PRINT [USING format$;] value ...
  668. DESCRIPTION: Sends output to the screen.
  669. ------------------------------------------------------------
  670. SYNTAX: PUT filename$ , value [, ...]
  671. DESCRIPTION: Puts one (or more) values into a file.
  672. ------------------------------------------------------------
  673. SYNTAX: QUIT
  674. DESCRIPTION: Exits to the operating system.
  675. ------------------------------------------------------------
  676. SYNTAX: READ variable [, ...]
  677. DESCRIPTION: Reads values from DATA statements.
  678. ------------------------------------------------------------
  679. SYNTAX: REM ...
  680. DESCRIPTION: Remark.
  681. ------------------------------------------------------------
  682. SYNTAX: RESET filename$ [, ...]
  683. DESCRIPTION: Positions an input or output file to the
  684. bcginning.
  685. ------------------------------------------------------------
  686. SYNTAX: RESTORE [line]
  687. DESCRIPTION: Resets the line used for the next READ
  688. statement. line may be either a number or a
  689. label.
  690. ------------------------------------------------------------
  691. SYNTAX: RETURN
  692. DESCRIPTION: Concludes a subroutine called by GOSUB.
  693. ------------------------------------------------------------
  694. SYNTAX: RUN filename$
  695. DESCRIPTION: Loads a new BAASIC program and executes the
  696. program from the start.
  697. ------------------------------------------------------------
  698. SYNTAX: RUN line
  699. DESCRIPTION: Executes the program in memory beginning at
  700. line.
  701. ------------------------------------------------------------
  702. SYNTAX: RUN
  703. DESCRIPTION: Executes the program in memory from the start.
  704. ------------------------------------------------------------
  705. SYNTAX: RUNNH line
  706. DESCRIPTION: Executes the program in memory beginning at
  707. line.
  708. ------------------------------------------------------------
  709. SYNTAX: RUNNH filename$
  710. DESCRIPTION: Loads a new BAASIC program and executes the
  711. program from the start.
  712. ------------------------------------------------------------
  713. SYNTAX: RUNNH
  714. DESCRIPTION: Executes the program in memory from the start.
  715. ------------------------------------------------------------
  716. SYNTAX: SAVE [filename$]
  717. DESCRIPTION: Saves the current program into the file
  718. filename$ in ASCII format.
  719. ------------------------------------------------------------
  720. SYNTAX: STEP
  721. DESCRIPTION: Syntax Error.
  722. ------------------------------------------------------------
  723. SYNTAX: STOP
  724. DESCRIPTION: Interrupts program execution and displays the
  725. line number of the STOP command. For use
  726. when debugging BASIC programs. Whether STOP
  727. issues a SIGINT signal is implementation
  728. defined.
  729. ------------------------------------------------------------
  730. SYNTAX: SYSTEM
  731. DESCRIPTION: Exits to the operating system.
  732. ------------------------------------------------------------
  733. SYNTAX: THEN
  734. DESCRIPTION: Syntax Error.
  735. ------------------------------------------------------------
  736. SYNTAX: TO
  737. DESCRIPTION: Syntax Error.
  738. ------------------------------------------------------------
  739. SYNTAX: USE parameter$
  740. DESCRIPTION: Receives the value from the calling CHAINing
  741. program.
  742. ------------------------------------------------------------
  743. ============================================================
  744. FUNCTIONS
  745. ============================================================
  746. ------------------------------------------------------------
  747. SYNTAX: N = ABS( X )
  748. PARAMETER: X is a number
  749. DESCRIPTION: The absolute value of X.
  750. ------------------------------------------------------------
  751. SYNTAX: N = ACS( X )
  752. PARAMETER: X is a number
  753. DESCRIPTION: The arccosine of X in radians, where 0 <=
  754. ACS(X) <= PI. X shall be in the range -1 <=
  755. X <= 1.
  756. ------------------------------------------------------------
  757. SYNTAX: N = ASC( A$ )
  758. PARAMETER: A$ is a string, LEN >= 1
  759. DESCRIPTION: The numeric code for the first letter in A$.
  760. For example, ASC("ABC") returns 65 on ASCII
  761. systems.
  762. ------------------------------------------------------------
  763. SYNTAX: N = ASN( X )
  764. PARAMETER: X is a number
  765. DESCRIPTION: The arcsine of X in radians, where -PI/2 <=
  766. ASN(X) <= PI/2; X shall be in the range -1 <=
  767. X <= 1.
  768. ------------------------------------------------------------
  769. SYNTAX: N = ATN( X )
  770. PARAMETER: X is a number
  771. DESCRIPTION: The arctangent of X in radians, i.e. the angle
  772. whose tangent is X, where -PI/2 < ATN(X) <
  773. PI/2.
  774. ------------------------------------------------------------
  775. SYNTAX: S$ = CHR( X )
  776. PARAMETER: X is a number
  777. DESCRIPTION: The output of PRINT X. A$ = CHR(X) is the
  778. opposite of X = NUM(A$).
  779. ------------------------------------------------------------
  780. SYNTAX: N = COS( X )
  781. PARAMETER: X is a number
  782. DESCRIPTION: The cosine of X, where X is in radians.
  783. ------------------------------------------------------------
  784. SYNTAX: N = COT( X )
  785. PARAMETER: X is a number
  786. DESCRIPTION: The cotangent of X, where X is in radians.
  787. ------------------------------------------------------------
  788. SYNTAX: N = CSC( X )
  789. PARAMETER: X is a number
  790. DESCRIPTION: The cosecant of X, where X is in radians.
  791. ------------------------------------------------------------
  792. SYNTAX: N = DEG( X )
  793. PARAMETER: X is a number
  794. DESCRIPTION: The number of degrees in X radians.
  795. ------------------------------------------------------------
  796. SYNTAX: N = DET
  797. DESCRIPTION: The determinant of the last MAT INV. Zero
  798. means error.
  799. ------------------------------------------------------------
  800. SYNTAX: N = EXP( X )
  801. PARAMETER: X is a number
  802. DESCRIPTION: The exponential value of X, i.e., the value of
  803. the base of natural logarithms (e = 2.71828)
  804. raised to the power of X; if EXP(X) is less
  805. that machine infinitesimal, then its value
  806. shall be replaced with zero.
  807. ------------------------------------------------------------
  808. SYNTAX: N = FIX( X )
  809. PARAMETER: X is a number
  810. DESCRIPTION: The truncated integer, part of X. FIX (X) is
  811. equivalent to SGN(X)*INT(ABS(X)). The major
  812. difference between FIX and INT is that FIX
  813. does not return the next lower number for
  814. negative X.
  815. ------------------------------------------------------------
  816. SYNTAX: N = HCS( X )
  817. PARAMETER: X is a number
  818. DESCRIPTION: The hyperbolic cosine of X.
  819. ------------------------------------------------------------
  820. SYNTAX: N = HSN( X )
  821. PARAMETER: X is a number
  822. DESCRIPTION: The hyperbolic sine of X.
  823. ------------------------------------------------------------
  824. SYNTAX: N = HTN( X )
  825. PARAMETER: X is a number
  826. DESCRIPTION: The hyperbolic tangent of X.
  827. ------------------------------------------------------------
  828. SYNTAX: N = INT( X )
  829. PARAMETER: X is a number
  830. DESCRIPTION: The largest integer not greater than X; e.g.
  831. INT(1.3) = 1 and INT(-1.3) = 2.
  832. ------------------------------------------------------------
  833. SYNTAX: N = LEN( A$ )
  834. PARAMETER: A$ is a string, LEN >= 0
  835. DESCRIPTION: The length of A$.
  836. ------------------------------------------------------------
  837. SYNTAX: N = LGT( X )
  838. PARAMETER: X is a number, > 0
  839. DESCRIPTION: The common logarithm of X; X shall be greater
  840. than zero.
  841. ------------------------------------------------------------
  842. SYNTAX: N = LOG( X )
  843. PARAMETER: X is a number, > 0
  844. DESCRIPTION: The natural logarithm of X; X shall be greater
  845. than zero.
  846. ------------------------------------------------------------
  847. SYNTAX: N = LTW( X )
  848. PARAMETER: X is a number, > 0
  849. DESCRIPTION: The base 2 logarithm of X; X shall be greater
  850. than zero.
  851. ------------------------------------------------------------
  852. SYNTAX: S$ = MAX( A$, B$ )
  853. PARAMETER: A$ is a string, LEN >= 0
  854. PARAMETER: B$ is a string, LEN >= 0
  855. DESCRIPTION: The larger of the parameters.
  856. ------------------------------------------------------------
  857. SYNTAX: N = MAX( X, Y )
  858. PARAMETER: X is a number
  859. PARAMETER: Y is a number
  860. DESCRIPTION: The larger of the parameters.
  861. ------------------------------------------------------------
  862. SYNTAX: N = MIN( X, Y )
  863. PARAMETER: X is a number
  864. PARAMETER: Y is a number
  865. DESCRIPTION: The smaller of the parameters.
  866. ------------------------------------------------------------
  867. SYNTAX: S$ = MIN( A$, B$ )
  868. PARAMETER: A$ is a string, LEN >= 0
  869. PARAMETER: B$ is a string, LEN >= 0
  870. DESCRIPTION: The smaller of the parameters.
  871. ------------------------------------------------------------
  872. SYNTAX: N = NUM( A$ )
  873. PARAMETER: A$ is a string, LEN >= 0
  874. DESCRIPTION: The value of the numeric-constant associated
  875. with A$, if the string associated with A$ is
  876. a numeric-constant. Leading and trailing
  877. spaces in the string are ignored. If the
  878. evaluation of the numeric-constant would
  879. result in a value which causes an underflow,
  880. then the value returned shall be zero. For
  881. example, NUM( " 123.5 " ) = 123.5, NUM(
  882. "2.E-99" ) could be zero, and NUM( "MCMXVII"
  883. ) causes an exception.
  884. ------------------------------------------------------------
  885. SYNTAX: S$ = NUM$( X )
  886. PARAMETER: X is a number
  887. DESCRIPTION: The string generated by the print-statement as
  888. the numeric-representation of the value
  889. associated with X.
  890. ------------------------------------------------------------
  891. SYNTAX: N = RAD( X )
  892. PARAMETER: X is a number
  893. DESCRIPTION: The number of radians in X degrees.
  894. ------------------------------------------------------------
  895. SYNTAX: N = RANDOMIZE
  896. DESCRIPTION: Seeds the pseudo-random number generator with
  897. TIME.
  898. ------------------------------------------------------------
  899. SYNTAX: N = RANDOMIZE( X )
  900. PARAMETER: X is a number
  901. DESCRIPTION: Seeds the pseudo-random number generator with
  902. X.
  903. ------------------------------------------------------------
  904. SYNTAX: N = RND
  905. DESCRIPTION: The next pseudo-random number in an
  906. implementation-defined sequence of
  907. pseudo-random numbers uniformly distributed
  908. in the range 0 <= RND < 1.
  909. ------------------------------------------------------------
  910. SYNTAX: N = RND( X )
  911. PARAMETER: X is a number
  912. DESCRIPTION: Returns a pseudorandom number in the range
  913. [0,1]. The value of X is ignored.
  914. ------------------------------------------------------------
  915. SYNTAX: N = SEC( X )
  916. PARAMETER: X is a number
  917. DESCRIPTION: The secant of X, where X is in radians.
  918. ------------------------------------------------------------
  919. SYNTAX: N = SGN( X )
  920. PARAMETER: X is a number
  921. DESCRIPTION: The sign of X: -1 if X < 0, 0 if X = 0, and +1
  922. if X > 0.
  923. ------------------------------------------------------------
  924. SYNTAX: N = SIN( X )
  925. PARAMETER: X is a number
  926. DESCRIPTION: The sine of X, where X is in radians.
  927. ------------------------------------------------------------
  928. SYNTAX: S$ = SPC( X )
  929. PARAMETER: X is a number
  930. DESCRIPTION: The string of X spaces. Only for use within
  931. the PRINT command.
  932. ------------------------------------------------------------
  933. SYNTAX: N = SQR( X )
  934. PARAMETER: X is a number, >= 0
  935. DESCRIPTION: The non-negative square root of X; X shall be
  936. non-negative.
  937. ------------------------------------------------------------
  938. SYNTAX: S$ = STR$( X )
  939. PARAMETER: X is a number
  940. DESCRIPTION: The string generated by the print-statement as
  941. the numeric-representation of the value
  942. associated with X.
  943. ------------------------------------------------------------
  944. SYNTAX: S$ = TAB( X )
  945. PARAMETER: X is a number
  946. DESCRIPTION: The string required to advance to column X.
  947. Only for use within the PRINT command.
  948. ------------------------------------------------------------
  949. SYNTAX: N = TAN( X )
  950. PARAMETER: X is a number
  951. DESCRIPTION: The tangent of X, where X is in radians.
  952. ------------------------------------------------------------
  953. SYNTAX: N = TIM
  954. DESCRIPTION: The time elapsed since the previous midnight,
  955. expressed in seconds; e.g., the value of TIME
  956. at 11:15 AM is 40500. If there is no clock
  957. available, then the value of TIME shall be
  958. -1. The value of TIME at midnight shall be
  959. zero (not 86400).
  960. ------------------------------------------------------------
  961. SYNTAX: N = VAL( A$ )
  962. PARAMETER: A$ is a string, LEN >= 1
  963. DESCRIPTION: The value of the numeric-constant associated
  964. with A$, if the string associated with A$ is
  965. a numeric-constant. Leading and trailing
  966. spaces in the string are ignored. If the
  967. evaluation of the numeric-constant would
  968. result in a value which causes an underflow,
  969. then the value returned shall be zero. For
  970. example, VAL( " 123.5 " ) = 123.5, VAL(
  971. "2.E-99" ) could be zero, and VAL( "MCMXVII"
  972. ) causes an exception.
  973. ------------------------------------------------------------
  974. ============================================================
  975. OPERATORS
  976. ============================================================
  977. ------------------------------------------------------------
  978. SYNTAX: X ** Y
  979. DESCRIPTION: Exponential
  980. PRECEDENCE: 14
  981. ------------------------------------------------------------
  982. SYNTAX: X ^ Y
  983. DESCRIPTION: Exponential
  984. PRECEDENCE: 14
  985. ------------------------------------------------------------
  986. SYNTAX: + X
  987. DESCRIPTION: Posation
  988. PRECEDENCE: 13
  989. ------------------------------------------------------------
  990. SYNTAX: - X
  991. DESCRIPTION: Negation
  992. PRECEDENCE: 13
  993. ------------------------------------------------------------
  994. SYNTAX: X * Y
  995. DESCRIPTION: Multiplication
  996. PRECEDENCE: 12
  997. ------------------------------------------------------------
  998. SYNTAX: X / Y
  999. DESCRIPTION: Division
  1000. PRECEDENCE: 12
  1001. ------------------------------------------------------------
  1002. SYNTAX: X \ Y
  1003. DESCRIPTION: Integer Division
  1004. PRECEDENCE: 11
  1005. ------------------------------------------------------------
  1006. SYNTAX: X + Y
  1007. DESCRIPTION: Addition
  1008. PRECEDENCE: 9
  1009. ------------------------------------------------------------
  1010. SYNTAX: X - Y
  1011. DESCRIPTION: Subtraction
  1012. PRECEDENCE: 9
  1013. ------------------------------------------------------------
  1014. SYNTAX: X < Y
  1015. DESCRIPTION: Less than
  1016. PRECEDENCE: 7
  1017. ------------------------------------------------------------
  1018. SYNTAX: X <= Y
  1019. DESCRIPTION: Less than or Equal
  1020. PRECEDENCE: 7
  1021. ------------------------------------------------------------
  1022. SYNTAX: X <> Y
  1023. DESCRIPTION: Not Equal
  1024. PRECEDENCE: 7
  1025. ------------------------------------------------------------
  1026. SYNTAX: X = Y
  1027. DESCRIPTION: Equal
  1028. PRECEDENCE: 7
  1029. ------------------------------------------------------------
  1030. SYNTAX: X =< Y
  1031. DESCRIPTION: Less than or Equal
  1032. PRECEDENCE: 7
  1033. ------------------------------------------------------------
  1034. SYNTAX: X => Y
  1035. DESCRIPTION: Greater than or Equal
  1036. PRECEDENCE: 7
  1037. ------------------------------------------------------------
  1038. SYNTAX: X > Y
  1039. DESCRIPTION: Greater than
  1040. PRECEDENCE: 7
  1041. ------------------------------------------------------------
  1042. SYNTAX: X >< Y
  1043. DESCRIPTION: Not Equal
  1044. PRECEDENCE: 7
  1045. ------------------------------------------------------------
  1046. SYNTAX: X >= Y
  1047. DESCRIPTION: Greater than or Equal
  1048. PRECEDENCE: 7
  1049. ------------------------------------------------------------
  1050. SYNTAX: NOT X
  1051. DESCRIPTION: Bitwise NOT
  1052. PRECEDENCE: 6
  1053. ------------------------------------------------------------
  1054. SYNTAX: X AND Y
  1055. DESCRIPTION: Bitwise AND
  1056. PRECEDENCE: 5
  1057. ------------------------------------------------------------
  1058. SYNTAX: X OR Y
  1059. DESCRIPTION: Bitwise OR
  1060. PRECEDENCE: 4
  1061. ------------------------------------------------------------
  1062. SYNTAX: X XOR Y
  1063. DESCRIPTION: Bitwise Exclusive OR
  1064. PRECEDENCE: 3
  1065. ------------------------------------------------------------
  1066. SYNTAX: X EQV Y
  1067. DESCRIPTION: Bitwise EQV
  1068. PRECEDENCE: 2
  1069. ------------------------------------------------------------
  1070. SYNTAX: X IMP Y
  1071. DESCRIPTION: Bitwise IMP
  1072. PRECEDENCE: 1
  1073. ------------------------------------------------------------