Mixing in TiddlyWiki transclusion syntax in BASIC programs

15 views
Skip to first unread message

Charlie Veniot

unread,
Mar 6, 2022, 7:19:34 PM3/6/22
to TiddlyWiki

A use case: finding a workaround for wwwBASIC not allowing the use of variables for array dimension sizes, i.e. not allowing "x = 4 : DIM this_array(x)"

TiddlyWiki to the rescue !

And while I was at it, I decided to show some more TiddlyWiki goodness in (revised from a video back in early December) the following code:

```
'🟠 DECLARATIONS
option base 1
dim MarxBro$({{{ [tag[Marx Brother]count[]] }}})
MarxBroCount = {{{ [tag[Marx Brother]count[]] }}}
'
'🟠 MAIN PROGRAM
restore MarxBrothers
for i = 1 to MarxBroCount
read MarxBro$(i)
next i
'
print "The source data (transclusion of tiddler titles from TiddlyWiki: "
print "{{{ [tag[Marx Brother]] +[sort[]] +[join[,]] }}}" : print : print
print "Now, the values stored in the array:"
for i = 1 to MarxBroCount
print "MarxBro$(" + i + ") = " + MarxBro$(i)
next i
end
'
'🟠 DATA
MarxBrothers:
DATA {{{ [tag[Marx Brother]] +[sort[]] +[join[,]] }}}

```
Reply all
Reply to author
Forward
0 new messages