[tw5] BASIC Anywhere Machine can now write to and read from local storage

BASIC Anywhere Machine

Sample BASIC program:
`
SetLocalStorageItem (“salutation”, “howdy, buddy”)
Print GetLocalStorageItem (“salutation”)
SetLocalStorageItem (1, 5)
Print GetLocalStorageItem (1)

`

In and of itself, a nice thing to have for BASIC programs meant just for BASIC Anywhere Machine.

Now, how interesting is this:

A BASIC Anywhere Machine program outputs results to local storage. A TiddlyWiki instance (same one hosting BASIC Anywhere Machine, or any other TiddlyWiki in the same domain) can get/set the values from local storage.

So a BASIC Anywhere Machine and TiddlyWiki instances have a communication (data transfer) interface.

Guess where the rest of my day is going?

Well, that was ridiculously easy. (Screenshots below.)

I’ve got a TiddlyWiki javascript macro to get local storage values.

If you have ideas about what would be useful related additions for browser local storage in TiddlyWiki, in general or specific to the interfacing between a BASIC Anywhere Machine program and TiddlyWiki, give me a shout !

Arg, maybe I should have mentioned why I’m liking this.

As much as I enjoy doing things in TiddlyWiki au naturel, there are times in which I think some heavy-duty processing would be so much easier to do in BASIC.

So I’m thinking this is a really neat use case for BASIC Anywhere Machine.