*polished sample code.

This commit is contained in:
paladin-t 2016-01-29 20:04:32 +08:00
parent 6ff4cddbba
commit 5521ab62fc
3 changed files with 6 additions and 6 deletions

View File

@ -2,6 +2,6 @@
' Copyright (c) 2011 - 2016 Wang Renxin. All rights reserved.
' For more information, see https://github.com/paladin-t/my_basic/
s$ = "hello "
s$ = s$ + "world"
s$ = "Hello"
s$ = s$ + " " + "world"
print s$ + "!"

View File

@ -4,19 +4,19 @@
class animal
def speak(a)
print "default" + a;
print "Default" + a;
enddef
endclass
class cat(animal)
def speak(a)
print "meow" + a;
print "Meow" + a;
enddef
endclass
class dog(animal)
def speak(a)
print "woof" + a;
print "Woof" + a;
enddef
endclass

View File

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