*polished sample programs.
This commit is contained in:
parent
7398c1d8c3
commit
4b75e2ae16
@ -1,8 +1,6 @@
|
|||||||
## Samples of MY-BASIC
|
## Samples of MY-BASIC
|
||||||
|
|
||||||
**Copyright (C) 2011 - 2017 Wang Renxin. All rights reserved.**
|
This folder contains severial sample programs of MY-BASIC.
|
||||||
|
|
||||||
This folder contains severial sample code of MY-BASIC.
|
|
||||||
|
|
||||||
### Contents
|
### Contents
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
' This script is an example of MY-BASIC
|
REM This program is an example of MY-BASIC
|
||||||
' Copyright (c) 2011 - 2017 Wang Renxin. All rights reserved.
|
REM For more information, see https://github.com/paladin-t/my_basic/
|
||||||
' For more information, see https://github.com/paladin-t/my_basic/
|
|
||||||
|
|
||||||
s$ = "Hello"
|
s$ = "Hello"
|
||||||
s$ = s$ + " " + "world"
|
s$ = s$ + " " + "world"
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
' This script is an example of MY-BASIC
|
REM This program is an example of MY-BASIC
|
||||||
' Copyright (c) 2011 - 2017 Wang Renxin. All rights reserved.
|
REM For more information, see https://github.com/paladin-t/my_basic/
|
||||||
' For more information, see https://github.com/paladin-t/my_basic/
|
|
||||||
|
|
||||||
e = 50
|
e = 50
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
' This script is an example of MY-BASIC
|
REM This program is an example of MY-BASIC
|
||||||
' Copyright (c) 2011 - 2017 Wang Renxin. All rights reserved.
|
REM For more information, see https://github.com/paladin-t/my_basic/
|
||||||
' For more information, see https://github.com/paladin-t/my_basic/
|
|
||||||
|
|
||||||
input "Input: ", ns$
|
input "Input: ", ns$
|
||||||
n = val(ns$)
|
n = val(ns$)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
' This script is an example of MY-BASIC
|
REM This program is an example of MY-BASIC
|
||||||
' Copyright (c) 2011 - 2017 Wang Renxin. All rights reserved.
|
REM For more information, see https://github.com/paladin-t/my_basic/
|
||||||
' For more information, see https://github.com/paladin-t/my_basic/
|
|
||||||
|
|
||||||
begin:
|
begin:
|
||||||
n = 10
|
n = 10
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
' This script is an example of MY-BASIC
|
REM This program is an example of MY-BASIC
|
||||||
' Copyright (c) 2011 - 2017 Wang Renxin. All rights reserved.
|
REM For more information, see https://github.com/paladin-t/my_basic/
|
||||||
' For more information, see https://github.com/paladin-t/my_basic/
|
|
||||||
|
|
||||||
def area(a, b)
|
def area(a, b)
|
||||||
return call mul(a, b)
|
return call mul(a, b)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
' This script is an example of MY-BASIC
|
REM This program is an example of MY-BASIC
|
||||||
' Copyright (c) 2011 - 2017 Wang Renxin. All rights reserved.
|
REM 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)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
' This script is an example of MY-BASIC
|
REM This program is an example of MY-BASIC
|
||||||
' Copyright (c) 2011 - 2017 Wang Renxin. All rights reserved.
|
REM For more information, see https://github.com/paladin-t/my_basic/
|
||||||
' For more information, see https://github.com/paladin-t/my_basic/
|
|
||||||
|
|
||||||
def reserve(m, n)
|
def reserve(m, n)
|
||||||
for j = len(m) to n + 2
|
for j = len(m) to n + 2
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
## YARD (Yet Another RPG Dungeon)
|
## 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.
|
"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
|
### Usage
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
' Yet Another RPG Dungeon is a text based game.
|
REM Yet Another RPG Dungeon is a text based game.
|
||||||
' It's aimed to be a comprehensive example and or a tutorial of MY-BASIC.
|
REM It's aimed to be a comprehensive example and a tutorial of MY-BASIC.
|
||||||
' Copyright (C) 2011 - 2017 Wang Renxin. All rights reserved.
|
REM For more information, see https://github.com/paladin-t/my_basic/
|
||||||
' For more information about MY-BASIC, see https://github.com/paladin-t/my_basic/
|
|
||||||
|
|
||||||
class entity
|
class entity
|
||||||
var name = ""
|
var name = ""
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
' Yet Another RPG Dungeon is a text based game.
|
REM Yet Another RPG Dungeon is a text based game.
|
||||||
' It's aimed to be a comprehensive example and or a tutorial of MY-BASIC.
|
REM It's aimed to be a comprehensive example and a tutorial of MY-BASIC.
|
||||||
' Copyright (C) 2011 - 2017 Wang Renxin. All rights reserved.
|
REM For more information, see https://github.com/paladin-t/my_basic/
|
||||||
' For more information about MY-BASIC, see https://github.com/paladin-t/my_basic/
|
|
||||||
|
|
||||||
import "entity.bas"
|
import "entity.bas"
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
' Yet Another RPG Dungeon is a text based game.
|
REM Yet Another RPG Dungeon is a text based game.
|
||||||
' It's aimed to be a comprehensive example and or a tutorial of MY-BASIC.
|
REM It's aimed to be a comprehensive example and a tutorial of MY-BASIC.
|
||||||
' Copyright (C) 2011 - 2017 Wang Renxin. All rights reserved.
|
REM For more information, see https://github.com/paladin-t/my_basic/
|
||||||
' For more information about MY-BASIC, see https://github.com/paladin-t/my_basic/
|
|
||||||
|
|
||||||
import "goal.bas"
|
import "goal.bas"
|
||||||
import "map.bas"
|
import "map.bas"
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
' Yet Another RPG Dungeon is a text based game.
|
REM Yet Another RPG Dungeon is a text based game.
|
||||||
' It's aimed to be a comprehensive example and or a tutorial of MY-BASIC.
|
REM It's aimed to be a comprehensive example and a tutorial of MY-BASIC.
|
||||||
' Copyright (C) 2011 - 2017 Wang Renxin. All rights reserved.
|
REM For more information, see https://github.com/paladin-t/my_basic/
|
||||||
' For more information about MY-BASIC, see https://github.com/paladin-t/my_basic/
|
|
||||||
|
|
||||||
import "utils.bas"
|
import "utils.bas"
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
' Yet Another RPG Dungeon is a text based game.
|
REM Yet Another RPG Dungeon is a text based game.
|
||||||
' It's aimed to be a comprehensive example and or a tutorial of MY-BASIC.
|
REM It's aimed to be a comprehensive example and a tutorial of MY-BASIC.
|
||||||
' Copyright (C) 2011 - 2017 Wang Renxin. All rights reserved.
|
REM For more information, see https://github.com/paladin-t/my_basic/
|
||||||
' For more information about MY-BASIC, see https://github.com/paladin-t/my_basic/
|
|
||||||
|
|
||||||
import "entity.bas"
|
import "entity.bas"
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
' Yet Another RPG Dungeon is a text based game.
|
REM Yet Another RPG Dungeon is a text based game.
|
||||||
' It's aimed to be a comprehensive example and or a tutorial of MY-BASIC.
|
REM It's aimed to be a comprehensive example and a tutorial of MY-BASIC.
|
||||||
' Copyright (C) 2011 - 2017 Wang Renxin. All rights reserved.
|
REM For more information, see https://github.com/paladin-t/my_basic/
|
||||||
' For more information about MY-BASIC, see https://github.com/paladin-t/my_basic/
|
|
||||||
|
|
||||||
import "entity.bas"
|
import "entity.bas"
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
' Yet Another RPG Dungeon is a text based game.
|
REM Yet Another RPG Dungeon is a text based game.
|
||||||
' It's aimed to be a comprehensive example and or a tutorial of MY-BASIC.
|
REM It's aimed to be a comprehensive example and a tutorial of MY-BASIC.
|
||||||
' Copyright (C) 2011 - 2017 Wang Renxin. All rights reserved.
|
REM For more information, see https://github.com/paladin-t/my_basic/
|
||||||
' For more information about MY-BASIC, see https://github.com/paladin-t/my_basic/
|
|
||||||
|
|
||||||
import "entity.bas"
|
import "entity.bas"
|
||||||
import "utils.bas"
|
import "utils.bas"
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
' Yet Another RPG Dungeon is a text based game.
|
REM Yet Another RPG Dungeon is a text based game.
|
||||||
' It's aimed to be a comprehensive example and or a tutorial of MY-BASIC.
|
REM It's aimed to be a comprehensive example and a tutorial of MY-BASIC.
|
||||||
' Copyright (C) 2011 - 2017 Wang Renxin. All rights reserved.
|
REM For more information, see https://github.com/paladin-t/my_basic/
|
||||||
' For more information about MY-BASIC, see https://github.com/paladin-t/my_basic/
|
|
||||||
|
|
||||||
import "level.bas"
|
import "level.bas"
|
||||||
import "player.bas"
|
import "player.bas"
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
' Yet Another RPG Dungeon is a text based game.
|
REM Yet Another RPG Dungeon is a text based game.
|
||||||
' It's aimed to be a comprehensive example and or a tutorial of MY-BASIC.
|
REM It's aimed to be a comprehensive example and a tutorial of MY-BASIC.
|
||||||
' Copyright (C) 2011 - 2017 Wang Renxin. All rights reserved.
|
REM For more information, see https://github.com/paladin-t/my_basic/
|
||||||
' For more information about MY-BASIC, see https://github.com/paladin-t/my_basic/
|
|
||||||
|
|
||||||
def cls()
|
def cls()
|
||||||
if os() = "WINDOWS" then
|
if os() = "WINDOWS" then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user