*polished sample programs.
This commit is contained in:
parent
7398c1d8c3
commit
4b75e2ae16
@ -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
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
||||
|
@ -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$)
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 = ""
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user