Demo of a Visual BASIC Converter in CODA

a long time ago in a galaxy far far away (called the mid-1970’s)…

young hackers like me were playing with Zilog Z80 chips and 6502 CPUs
(now its Adrinos & Raspberry PIs)

and the first program we would write was an interpreter for TINY BASIC

now, decades later, i wanted to do the same in CODA

not JUST for fun, but because many of my clients have TONS of macros and automations running in Excel using Visual BASIC (VBA)

so this little demo implements a tiny sub-set of the VBA language, converts it into Coda Formula Language and executes it on any set of Tables or Canvas Controls you have in your document.

its very crude at this point - only a few statement types are supported and there is NO syntax checking - if you have an error the code just fails to run

i plan to rectify all that over time AND use the same method to implement Javascript, Python & Clojure.

respect
max

9 Likes

Holy hell :rofl:
Good job @Agile_Dynamics :joy:

1 Like

thanks @Paul_Danyliuk,

its VERY crude, not even a proper lexical analyser

just a rough proof of concept or ‘spike’ as they say

but it runs, and it has lots of potential

AND its totally safe, it cant access anything nor do anything you cant do inside the doc with cfl anyways.

but

LOTS of work still to do

all fun and games

max

Very impressive! Basic was my first programming language, so it will always hold a special place in my heart. Any support for the GOTO statement? :laughing:

shock horror! @Eric_Koleda
i have not coded a goto since 1980
“considered harmful” was an understatement

for now i just map to existing coda features such as formulamap(), if(), switchif(), withname(), runactions(), and the regular data manipulation functions.

so when coda puts a goto() into cfl

THEN. and only then…

i will abandon coda and NEVER come back

:wink:

2 Likes

Man, why did you have to mention that?

I will lose my sleep now until I code a goto on Coda :laughing:

1 Like