*polished indent and new line format of sample code.

This commit is contained in:
paladin-t 2016-01-01 10:30:26 +08:00
parent 93d663365f
commit eeff6d28d2
6 changed files with 15 additions and 15 deletions

View File

@ -4,4 +4,4 @@
s$ = "hello "
s$ = s$ + "world"
print s$ + "!"
print s$ + "!"

View File

@ -14,4 +14,4 @@ for n = 3 to e
if isp = 0 then exit
wend
if isp = 1 then print n, ", "
next n
next n

View File

@ -19,4 +19,4 @@ for y = 5 to x step 2
next
a = a * 4
print "Pi = ", a
print "Pi = ", a

View File

@ -20,4 +20,4 @@ show:
for i = 0 to n - 1
print arr(i), ", "
next
return
return

View File

@ -12,4 +12,4 @@ enddef
a = 3
b = 4
print a; b; area(a, b);
print a; b; area(a, b);

View File

@ -3,25 +3,25 @@
' For more information, see https://github.com/paladin-t/my_basic/
class animal
def speak(a)
print "default" + a;
enddef
def speak(a)
print "default" + a;
enddef
endclass
class cat(animal)
def speak(a)
print "meow" + a;
enddef
def speak(a)
print "meow" + a;
enddef
endclass
class dog(animal)
def speak(a)
print "bark" + a;
enddef
def speak(a)
print "bark" + a;
enddef
endclass
c = new(cat)
d = new(dog)
c.speak("!")
d.speak("!")
d.speak("!")