*polished indent and new line format of sample code.
This commit is contained in:
parent
93d663365f
commit
eeff6d28d2
@ -3,21 +3,21 @@
|
|||||||
' For more information, see https://github.com/paladin-t/my_basic/
|
' For more information, see https://github.com/paladin-t/my_basic/
|
||||||
|
|
||||||
class animal
|
class animal
|
||||||
def speak(a)
|
def speak(a)
|
||||||
print "default" + a;
|
print "default" + a;
|
||||||
enddef
|
enddef
|
||||||
endclass
|
endclass
|
||||||
|
|
||||||
class cat(animal)
|
class cat(animal)
|
||||||
def speak(a)
|
def speak(a)
|
||||||
print "meow" + a;
|
print "meow" + a;
|
||||||
enddef
|
enddef
|
||||||
endclass
|
endclass
|
||||||
|
|
||||||
class dog(animal)
|
class dog(animal)
|
||||||
def speak(a)
|
def speak(a)
|
||||||
print "bark" + a;
|
print "bark" + a;
|
||||||
enddef
|
enddef
|
||||||
endclass
|
endclass
|
||||||
|
|
||||||
c = new(cat)
|
c = new(cat)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user