+added a new sample script source file; *updated clean shell.

This commit is contained in:
paladin-t 2015-12-31 10:18:38 +08:00
parent 4063ef1cea
commit a253352ffb
4 changed files with 58 additions and 4 deletions

View File

@ -1,3 +1,6 @@
Dec. 31 2015
Added a new sample script source file
Dec. 30 2015
Improved error handling with sub routine and class
Implemented DIR command

View File

@ -1,21 +1,25 @@
@echo off
echo Cleaning, a moment please...
rd /s /q .vs
rd /s /q temp
attrib *.suo -s -r -h
del /f /s /q *.exp
del /f /s /q *.log
del /f /s /q *.ncb
del /f /s /q *.obj
del /f /s /q *.pdb
del /f /s /q *.sdf
del /f /s /q *.suo
del /f /s /q *.user
rd /s /q temp
del /f /s /q output\*.dep
del /f /s /q output\*.htm
del /f /s /q output\*.idb
del /f /s /q output\*.ilk
del /f /s /q output\*.manifest
del /f /s /q output\*.obj
del /f /s /q output\*.pdb
del /f /s /q output\*.res
del /f /s /q output\my_basic_d.exe

View File

@ -309,6 +309,26 @@
/>
</FileConfiguration>
</File>
<File
RelativePath=".\sample\sample06.bas"
>
<FileConfiguration
Name="debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
<FileConfiguration
Name="release|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="res"

27
sample/sample06.bas Normal file
View File

@ -0,0 +1,27 @@
' This script is an example of MY-BASIC
' Copyright (c) 2011 - 2016 Wang Renxin. All rights reserved.
' For more information, see https://github.com/paladin-t/my_basic/
class animal
def speak(a)
print "default" + a;
enddef
endclass
class cat(animal)
def speak(a)
print "meow" + a;
enddef
endclass
class dog(animal)
def speak(a)
print "bark" + a;
enddef
endclass
c = new(cat)
d = new(dog)
c.speak("!")
d.speak("!")