tiny basic for windows 操作入門 目次tbasic.org/tutorial/201404howtotbasic.pdftiny basic for...
TRANSCRIPT
-
Tiny Basic for Windows
tbasic.org *1
[2014 4]
Tiny Basic for Windows
1 21.1 tbasic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2 92.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.2 tbasic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.3 Direct.tbt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3 143.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.3 tbasic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4 tbasic 184.1 Hello Basic! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
*1 http://www.tbasic.org
1
-
2
1 Tiny Basic Set Tiny
Basic for Windows tbasic tbasic tibasic
(1) tbasic (2) (3) (4)
1.1 tbasic
tbasic tbasic TinyBasic for Windows Tiny Basic for Windows
1.2
tbasic
Open
Opentbasic Open tbasic (P) (O)
-
3
Open a Program Sample
SampleSampleSampleSample
tbt
-
4
Sample *2
Advanced : Classical: Basic Game: Graphic: Number-Theory: Sort: Unicode:
Sample
Graphic
ColorNo.tbt ColorNo.tbt Open
*2
-
5
ColorNo.tbt
1.3
ColorNo.tbt
-
6
tbasic
tbasic tbasic
tbasic
1.4
tbasic
-
7
-
8
tbasic Close
Close
tbasic tbasic
-
9
1.5
Sample
2 2.1
N88-BASIC Windows Basic Tiny Basic for Windowstbasic Windows Dos Linux Mac tbasic BASIC
tbasic Dos Basic
Dos tbasic
N88-Basic tbasic Dos Unix tbasic
-
10
(1) tbasic (2) (3)
2.2 tbasic
tbasic Tiny Basic
-
11
print 2+3
Enter
print Deirect.tbt Sample
-
12
Basic Basic
Print
PRINT
pRinT
Print print
2.3 Direct.tbt
Sample Direct.tbt Direct Direct.tbt
-
13
BackSpace Del Enter
Print
Print ?
? 1+2
Print 1+2
2.4
-
14
3 tbasic
tbasic tbasic tbasic
tbasic Windows
3.1
-
15
3.2
tbasic
(1) (2)
(1)
-
16
(2)
Windows notepad.exe Windows
3.3 tbasic
tbasic
-
17
For to Next End BASIC
BASICB ASIC
-
18
3.4
1000000
Shift
4 tbasicSample tbasic
Basic tbasic BASIC tbasic tbasic
-
19
4.1 Hello Basic!
Hello World
Hello World Hello World Basic Hello Basic!
4.1. Hello Basic!
Print Hello Basic!
tbasic
(1) (2) (3) (4)
-
20
tbasic
-
21
End
Print Basic Basic
PRINT Hello Basic!
Hello BasicHELLOBASIC!
-
22
hello.tbt .tbt . tbt tbasic .tbt .tbt hello
tbasic TBasic
-
23
Untitled hello
-
24
hello.tbt hello
4.2
Hello Basic!
4.2.
-
25
ClsPrice = 20Gain = 0MaxCount = 0NumofGames = 10000For i=1 to NumofGamesRandomizeCount = 0Do While 1=1Result= Round(Rnd(1))if Result = 1 thenSyoukin = 2CountMaxCount= Max(MaxCount,Count)Exit do
end ifCount = Count +1
LoopGain = Gain+ Syoukin - Price
Next iPrint " "; Price;" "Print " "; Gain; ""Print " ";2MaxCount;""End
4.3
''ClsPrice = 20Gain = 0MaxCount = 0NumofGames = 10000For i=1 to NumofGames Randomize Count = 0 Do While 1=1 Result= Round(Rnd(1)) if Result = 1 then Syoukin = 2^Count MaxCount= Max(MaxCount,Count) Exit do end if Count = Count +1 Loop Gain = Gain+ Syoukin - PriceNext iPrint ""; Price;""Print ""; Gain; ""Print "";2^MaxCount;""End
tbasicHowToTbasicPeter.txt
1 1.1 tbasic 1.2 1.3 1.4 1.5
2 2.1 2.2 tbasic 2.3 Direct.tbt 2.4
3 3.1 3.2 3.3 tbasic 3.4
4 tbasic 4.1 Hello Basic!4.2 4.3