*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.
' For more information, see https://github.com/paladin-t/my_basic/
print "Input: "
input ns$
input "Input: ", ns$
n = val(ns$)
x = n * 2 - 1

View File

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