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

πŸ–₯ Fan Dance

This is a port and mod of a SpecBAS program by ZXDunny. Run the program View the source code And, a "less is more?" version: Run t...