*updated sample code.

This commit is contained in:
Wang Renxin 2016-12-16 11:40:15 +08:00
parent eb2b097a4a
commit 015ebcd6a7
2 changed files with 2 additions and 4 deletions

View File

@ -2,8 +2,7 @@
' Copyright (c) 2011 - 2016 Wang Renxin. All rights reserved. ' Copyright (c) 2011 - 2016 Wang Renxin. All rights reserved.
' For more information, see https://github.com/paladin-t/my_basic/ ' For more information, see https://github.com/paladin-t/my_basic/
print "Input: " input "Input: ", ns$
input ns$
n = val(ns$) n = val(ns$)
x = n * 2 - 1 x = n * 2 - 1

View File

@ -91,8 +91,7 @@ def brainfuck(cmd)
enddef enddef
' This is a brainfuck interpreter written with MY-BASIC ' This is a brainfuck interpreter written with MY-BASIC
print "Input: " input "Input: ", cmd$
input cmd$
' Use a sample code? ' Use a sample code?
if cmd$ = "hello" then if cmd$ = "hello" then
cmd$ = "++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>." cmd$ = "++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>."