This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |