Instantly share code, notes, and snippets.

View test.sh
a simple interpreter for BASIC written in AWK
see url https://gist.github.com/2959816
########## GWBASIC ###############
#!./basic2.sh
print "start"
s = 0:i = 0
loop:
s = s + i:i = i + 1
print "s" , s
View basic.sh
#!/usr/bin/gawk -f
# a simple interpreter for GWBASIC(subset) written in AWK
# following 'The AWK Programming Language' Chapter 6
# @date June 20,2012
# @link basic.sh https://gist.github.com/2959816
# @link test.sh https://gist.github.com/2959877
# TODO:
# gosub/return...ok
# if/else/elseif/endif...ok
# while/wend...ok