Mercurial > hg > Members > nobuyasu > SampleSource
diff Bison-Flex/BasicCompiler-MemoryBase/test.txt @ 0:db40c85cad7a default tip
upload sample source
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 09 May 2011 03:11:59 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Bison-Flex/BasicCompiler-MemoryBase/test.txt Mon May 09 03:11:59 2011 +0900 @@ -0,0 +1,44 @@ +'コメントテスト +rem これもコメント + +' 二重ループのテスト +for i=1 to 3 + for j=1 to 3 + print i, j + next +next + + +' 代入とrand関数のテスト +a = rand(10) +b = rand(10) + +' ある程度の計算式 +c = a + b * 10 / 3 + +print a, b, c + +' if文 +if a == b then + a = 100 +else + b = 100 +endif + +print a, b + +' for文 +for i=1 to 10 + a = a + 1 +next + +print a, b + +' while文 +while a != 0 + a = a - 1 +wend + +print a, b + +end