*polished sample programs.

This commit is contained in:
Wang Renxin 2017-11-20 12:43:44 +08:00
parent 7398c1d8c3
commit 4b75e2ae16
18 changed files with 42 additions and 62 deletions

View File

@ -1,8 +1,6 @@
## Samples of MY-BASIC
**Copyright (C) 2011 - 2017 Wang Renxin. All rights reserved.**
This folder contains severial sample code of MY-BASIC.
This folder contains severial sample programs of MY-BASIC.
### Contents

View File

@ -1,6 +1,5 @@
' This script is an example of MY-BASIC
' Copyright (c) 2011 - 2017 Wang Renxin. All rights reserved.
' For more information, see https://github.com/paladin-t/my_basic/
REM This program is an example of MY-BASIC
REM For more information, see https://github.com/paladin-t/my_basic/
s$ = "Hello"
s$ = s$ + " " + "world"

View File

@ -1,6 +1,5 @@
' This script is an example of MY-BASIC
' Copyright (c) 2011 - 2017 Wang Renxin. All rights reserved.
' For more information, see https://github.com/paladin-t/my_basic/
REM This program is an example of MY-BASIC
REM For more information, see https://github.com/paladin-t/my_basic/
e = 50

View File

@ -1,6 +1,5 @@
' This script is an example of MY-BASIC
' Copyright (c) 2011 - 2017 Wang Renxin. All rights reserved.
' For more information, see https://github.com/paladin-t/my_basic/
REM This program is an example of MY-BASIC
REM For more information, see https://github.com/paladin-t/my_basic/
input "Input: ", ns$
n = val(ns$)

View File

@ -1,6 +1,5 @@
' This script is an example of MY-BASIC
' Copyright (c) 2011 - 2017 Wang Renxin. All rights reserved.
' For more information, see https://github.com/paladin-t/my_basic/
REM This program is an example of MY-BASIC
REM For more information, see https://github.com/paladin-t/my_basic/
begin:
n = 10

View File

@ -1,6 +1,5 @@
' This script is an example of MY-BASIC
' Copyright (c) 2011 - 2017 Wang Renxin. All rights reserved.
' For more information, see https://github.com/paladin-t/my_basic/
REM This program is an example of MY-BASIC
REM For more information, see https://github.com/paladin-t/my_basic/
def area(a, b)
return call mul(a, b)

View File

@ -1,6 +1,5 @@
' This script is an example of MY-BASIC
' Copyright (c) 2011 - 2017 Wang Renxin. All rights reserved.
' For more information, see https://github.com/paladin-t/my_basic/
REM This program is an example of MY-BASIC
REM For more information, see https://github.com/paladin-t/my_basic/
class animal
def speak(a)

View File

@ -1,6 +1,5 @@
' This script is an example of MY-BASIC
' Copyright (c) 2011 - 2017 Wang Renxin. All rights reserved.
' For more information, see https://github.com/paladin-t/my_basic/
REM This program is an example of MY-BASIC
REM For more information, see https://github.com/paladin-t/my_basic/
def reserve(m, n)
for j = len(m) to n + 2

View File

@ -1,7 +1,5 @@
## YARD (Yet Another RPG Dungeon)
**Copyright (C) 2011 - 2017 Wang Renxin. All rights reserved.**
"Yet Another RPG Dungeon" is a text based game. It's a simple comprehensive example and a tutorial which demonstrates lots of aspects of MY-BASIC.
### Usage

View File

@ -1,7 +1,6 @@
' Yet Another RPG Dungeon is a text based game.
' It's aimed to be a comprehensive example and or a tutorial of MY-BASIC.
' Copyright (C) 2011 - 2017 Wang Renxin. All rights reserved.
' For more information about MY-BASIC, see https://github.com/paladin-t/my_basic/
REM Yet Another RPG Dungeon is a text based game.
REM It's aimed to be a comprehensive example and a tutorial of MY-BASIC.
REM For more information, see https://github.com/paladin-t/my_basic/
class entity
var name = ""

View File

@ -1,7 +1,6 @@
' Yet Another RPG Dungeon is a text based game.
' It's aimed to be a comprehensive example and or a tutorial of MY-BASIC.
' Copyright (C) 2011 - 2017 Wang Renxin. All rights reserved.
' For more information about MY-BASIC, see https://github.com/paladin-t/my_basic/
REM Yet Another RPG Dungeon is a text based game.
REM It's aimed to be a comprehensive example and a tutorial of MY-BASIC.
REM For more information, see https://github.com/paladin-t/my_basic/
import "entity.bas"

View File

@ -1,7 +1,6 @@
' Yet Another RPG Dungeon is a text based game.
' It's aimed to be a comprehensive example and or a tutorial of MY-BASIC.
' Copyright (C) 2011 - 2017 Wang Renxin. All rights reserved.
' For more information about MY-BASIC, see https://github.com/paladin-t/my_basic/
REM Yet Another RPG Dungeon is a text based game.
REM It's aimed to be a comprehensive example and a tutorial of MY-BASIC.
REM For more information, see https://github.com/paladin-t/my_basic/
import "goal.bas"
import "map.bas"

View File

@ -1,7 +1,6 @@
' Yet Another RPG Dungeon is a text based game.
' It's aimed to be a comprehensive example and or a tutorial of MY-BASIC.
' Copyright (C) 2011 - 2017 Wang Renxin. All rights reserved.
' For more information about MY-BASIC, see https://github.com/paladin-t/my_basic/
REM Yet Another RPG Dungeon is a text based game.
REM It's aimed to be a comprehensive example and a tutorial of MY-BASIC.
REM For more information, see https://github.com/paladin-t/my_basic/
import "utils.bas"

View File

@ -1,7 +1,6 @@
' Yet Another RPG Dungeon is a text based game.
' It's aimed to be a comprehensive example and or a tutorial of MY-BASIC.
' Copyright (C) 2011 - 2017 Wang Renxin. All rights reserved.
' For more information about MY-BASIC, see https://github.com/paladin-t/my_basic/
REM Yet Another RPG Dungeon is a text based game.
REM It's aimed to be a comprehensive example and a tutorial of MY-BASIC.
REM For more information, see https://github.com/paladin-t/my_basic/
import "entity.bas"

View File

@ -1,7 +1,6 @@
' Yet Another RPG Dungeon is a text based game.
' It's aimed to be a comprehensive example and or a tutorial of MY-BASIC.
' Copyright (C) 2011 - 2017 Wang Renxin. All rights reserved.
' For more information about MY-BASIC, see https://github.com/paladin-t/my_basic/
REM Yet Another RPG Dungeon is a text based game.
REM It's aimed to be a comprehensive example and a tutorial of MY-BASIC.
REM For more information, see https://github.com/paladin-t/my_basic/
import "entity.bas"

View File

@ -1,7 +1,6 @@
' Yet Another RPG Dungeon is a text based game.
' It's aimed to be a comprehensive example and or a tutorial of MY-BASIC.
' Copyright (C) 2011 - 2017 Wang Renxin. All rights reserved.
' For more information about MY-BASIC, see https://github.com/paladin-t/my_basic/
REM Yet Another RPG Dungeon is a text based game.
REM It's aimed to be a comprehensive example and a tutorial of MY-BASIC.
REM For more information, see https://github.com/paladin-t/my_basic/
import "entity.bas"
import "utils.bas"

View File

@ -1,7 +1,6 @@
' Yet Another RPG Dungeon is a text based game.
' It's aimed to be a comprehensive example and or a tutorial of MY-BASIC.
' Copyright (C) 2011 - 2017 Wang Renxin. All rights reserved.
' For more information about MY-BASIC, see https://github.com/paladin-t/my_basic/
REM Yet Another RPG Dungeon is a text based game.
REM It's aimed to be a comprehensive example and a tutorial of MY-BASIC.
REM For more information, see https://github.com/paladin-t/my_basic/
import "level.bas"
import "player.bas"

View File

@ -1,7 +1,6 @@
' Yet Another RPG Dungeon is a text based game.
' It's aimed to be a comprehensive example and or a tutorial of MY-BASIC.
' Copyright (C) 2011 - 2017 Wang Renxin. All rights reserved.
' For more information about MY-BASIC, see https://github.com/paladin-t/my_basic/
REM Yet Another RPG Dungeon is a text based game.
REM It's aimed to be a comprehensive example and a tutorial of MY-BASIC.
REM For more information, see https://github.com/paladin-t/my_basic/
def cls()
if os() = "WINDOWS" then