This is a simple dynamically typed BASIC interpreter for Lazarus/Free Pascal that i wrote some years ago. The language looks something like QBasic but without types and looks like this:
Function Reverse(Original) L = Len(Original) Reversed = "" For I = L To 1 Step -1 Reversed = Reversed + Mid(Original, I, 1) Next Reverse = Reversed End Function Print "Hello, world!" Print Reverse("Hello, world!")
There are two downloads available (both under the zlib license):
Note that the latter has several memory leaks that were fixed in the former.
This project is frozen, i do not plan on making any further updates to it. The code might help as an example on building compilers and virtual machines in Free Pascal though (but note that the VM isn't particularly fast).