2
0
Эх сурвалжийг харах

Added more blitz examples.

woollybah 6 жил өмнө
parent
commit
f016e20c88

+ 11 - 0
blitz.mod/doc/apptitle.bmx

@@ -0,0 +1,11 @@
+'Apptitle Example
+
+SuperStrict
+
+AppTitle = "Just a TITLE"
+Graphics 400, 400
+
+Repeat
+	DrawText "Hello World", 10, 20
+	Flip
+Until AppTerminate()

+ 6 - 0
blitz.mod/doc/debuglog.bmx

@@ -0,0 +1,6 @@
+'
+' Run in debug mode to see the output
+'
+SuperStrict
+
+DebugLog "My debug text"

+ 12 - 0
blitz.mod/doc/debugstop.bmx

@@ -0,0 +1,12 @@
+'
+' Run in debug mode
+'
+SuperStrict
+
+Graphics 640,480
+Local a:Int
+
+Repeat
+	a = Rnd(20)
+Until KeyDown(KEY_ESCAPE)
+DebugStop

+ 10 - 0
blitz.mod/doc/delay.bmx

@@ -0,0 +1,10 @@
+SuperStrict
+
+Print "This is a test line."
+
+Delay 3000
+
+Print "This line was printed 3000 milliseconds later."
+Print "This program will end in 2000 milliseconds."
+
+Delay 2000

+ 8 - 0
blitz.mod/doc/endwhile.bmx

@@ -0,0 +1,8 @@
+SuperStrict
+
+Local i:Int=0
+
+While i < 5
+  Print i
+  i :+ 1
+EndWhile  'can also use Wend

+ 9 - 0
blitz.mod/doc/framework.bmx

@@ -0,0 +1,9 @@
+' Use the Framework and Import functions to only include the function sets
+' that you want to use
+'
+SuperStrict
+
+Framework Brl.standardio ' so we can use print
+Import Brl.random ' so we can use the Rnd Function
+
+Print Rnd(255)

+ 7 - 0
blitz.mod/doc/millisecs.bmx

@@ -0,0 +1,7 @@
+SuperStrict
+
+Local start:Int = MilliSecs()
+
+Input("Type Anything >")
+
+Print "You took "+(MilliSecs()-start)+" milliseconds to type that."