Smallbasic programming language


smallbasic, while not entirely an easylang itself, is a great language to implement an easylang with. it should be reasonably familiar to most fans of the basic programming language, but is less of an "easylang" because it is not particularly easy to change or implement the actual interpreter. it is implemented mostly in c. *implementing a language in smallbasic:* '#### license: creative commons cc0 1.0 (public domain) '#### http://creativecommons.org/publicdomain/zero/1.0/ program = "CLS:COLOUR10:PRINThello there:SLEEP5:cls:COLOUR14:PRINThow are you:SLEEP15" pl = len(program) buf = "" for p = 1 to pl t = mid(program, p, 1) if t = ":": if left(lbuf, 3) = "cls": cls elif left(lbuf, 5) = "color": color val(right(buf, len(buf) - 5)) elif left(lbuf, 6) = "colour": color val(right(buf, len(buf) - 6)) elif left(lbuf, 5) = "print": print right(buf, len(buf) - 5) elif left(lbuf, 6) = "prints": print right(buf, len(buf) - 6); elif left(lbuf, 5) = "pause": pause val(right(buf, len(buf) - 5)) elif left(lbuf, 5) = "sleep": pause val(right(buf, len(buf) - 5)) fi buf = "" else buf += t lbuf = lcase(buf) fi next *for more information...* smallbasic's implementation license: gnu gpl 3 website: [url]https://smallbasic.sourceforge.io/[url]

Home