From 4b75e2ae1607cc67a8340ab0f2489d3f536636ec Mon Sep 17 00:00:00 2001 From: Wang Renxin Date: Mon, 20 Nov 2017 12:43:44 +0800 Subject: [PATCH] *polished sample programs. --- sample/README.md | 4 +--- sample/sample01.bas | 5 ++--- sample/sample02.bas | 5 ++--- sample/sample03.bas | 5 ++--- sample/sample04.bas | 5 ++--- sample/sample05.bas | 5 ++--- sample/sample06.bas | 5 ++--- sample/sample07.bas | 5 ++--- sample/yard/README.md | 2 -- sample/yard/entity.bas | 7 +++---- sample/yard/goal.bas | 7 +++---- sample/yard/level.bas | 7 +++---- sample/yard/map.bas | 7 +++---- sample/yard/monster.bas | 7 +++---- sample/yard/npc.bas | 7 +++---- sample/yard/player.bas | 7 +++---- sample/yard/start.bas | 7 +++---- sample/yard/utils.bas | 7 +++---- 18 files changed, 42 insertions(+), 62 deletions(-) diff --git a/sample/README.md b/sample/README.md index 637cf3c..9e78aae 100644 --- a/sample/README.md +++ b/sample/README.md @@ -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 diff --git a/sample/sample01.bas b/sample/sample01.bas index d39ce94..f6f8dd2 100755 --- a/sample/sample01.bas +++ b/sample/sample01.bas @@ -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" diff --git a/sample/sample02.bas b/sample/sample02.bas index d3e2332..9c688a8 100755 --- a/sample/sample02.bas +++ b/sample/sample02.bas @@ -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 diff --git a/sample/sample03.bas b/sample/sample03.bas index 65cf91e..7054b63 100755 --- a/sample/sample03.bas +++ b/sample/sample03.bas @@ -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$) diff --git a/sample/sample04.bas b/sample/sample04.bas index 412b579..c4543e8 100755 --- a/sample/sample04.bas +++ b/sample/sample04.bas @@ -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 diff --git a/sample/sample05.bas b/sample/sample05.bas index c310d20..a889574 100755 --- a/sample/sample05.bas +++ b/sample/sample05.bas @@ -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) diff --git a/sample/sample06.bas b/sample/sample06.bas index 1ce9b5b..eb616e6 100644 --- a/sample/sample06.bas +++ b/sample/sample06.bas @@ -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) diff --git a/sample/sample07.bas b/sample/sample07.bas index 33b3f66..8916873 100644 --- a/sample/sample07.bas +++ b/sample/sample07.bas @@ -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 diff --git a/sample/yard/README.md b/sample/yard/README.md index c2f0173..7acf860 100644 --- a/sample/yard/README.md +++ b/sample/yard/README.md @@ -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 diff --git a/sample/yard/entity.bas b/sample/yard/entity.bas index 59587c2..e734033 100644 --- a/sample/yard/entity.bas +++ b/sample/yard/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/ class entity var name = "" diff --git a/sample/yard/goal.bas b/sample/yard/goal.bas index d973055..b882168 100644 --- a/sample/yard/goal.bas +++ b/sample/yard/goal.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" diff --git a/sample/yard/level.bas b/sample/yard/level.bas index e83e5ff..327b24b 100644 --- a/sample/yard/level.bas +++ b/sample/yard/level.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" diff --git a/sample/yard/map.bas b/sample/yard/map.bas index 5999303..578d9f4 100644 --- a/sample/yard/map.bas +++ b/sample/yard/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" diff --git a/sample/yard/monster.bas b/sample/yard/monster.bas index 3335208..d76123f 100644 --- a/sample/yard/monster.bas +++ b/sample/yard/monster.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" diff --git a/sample/yard/npc.bas b/sample/yard/npc.bas index 5950ddb..bea9c21 100644 --- a/sample/yard/npc.bas +++ b/sample/yard/npc.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" diff --git a/sample/yard/player.bas b/sample/yard/player.bas index 23f54e1..050176e 100644 --- a/sample/yard/player.bas +++ b/sample/yard/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/ import "entity.bas" import "utils.bas" diff --git a/sample/yard/start.bas b/sample/yard/start.bas index 615c2eb..d2444cb 100644 --- a/sample/yard/start.bas +++ b/sample/yard/start.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" diff --git a/sample/yard/utils.bas b/sample/yard/utils.bas index fd2a0a7..7d3c618 100644 --- a/sample/yard/utils.bas +++ b/sample/yard/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/ def cls() if os() = "WINDOWS" then