Sunday, June 5, 2022

πŸ†• BASIC Anywhere Machine's "Include Directive"

 I just uploaded a new version of BASIC Anywhere Machine with a more formal/traditional syntax for the include directive.

Aside, about include directives (from Wikipedia):

Many programming languages and other computer files have a directive, often called include (sometimes copy or import), that causes the contents of the specified file to be inserted into the original file.

Syntax for the include directive in BAM:

<<include "File Name">>

  • The syntax requires everything in bold as-is
  • The only part that may vary is the file name parameter, provided between the double-quotes
  • BTW, BASIC Anywhere Machine is a single HTML file and otherwise does not work with files; technically, BASIC programs are stored in "tiddlers", aka wiki pages.
This allows us to split a large BASIC program into small modules that can be tested independently, and all be included into the main program.

I'm big fan of Componentization: Information, Knowledge, everything including BASIC programs.



No comments:

Post a Comment

πŸ–₯ Pongy game

This program is a port (and slight mod) of the QB64pe program by SierraKen.  (SierraKen's program shared with the QB64pe community in th...