Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,12 @@
|
|||
If OpenConsole()
|
||||
top:
|
||||
i = i + 1
|
||||
PrintN("Hello world.")
|
||||
If i < 10
|
||||
Goto top
|
||||
EndIf
|
||||
|
||||
Print(#CRLF$ + #CRLF$ + "Press ENTER to exit")
|
||||
Input()
|
||||
CloseConsole()
|
||||
EndIf
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
X=1: Y=2
|
||||
Gosub Calc
|
||||
;X will now equal 7
|
||||
End
|
||||
|
||||
Calc:
|
||||
X+3*Y
|
||||
Return ; Returns to the point in the code where the Gosub jumped from
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
Gosub MySub
|
||||
|
||||
Lable2:
|
||||
; The program will jump here, then 'end'
|
||||
End
|
||||
|
||||
MySub:
|
||||
If #PI>3
|
||||
FakeReturn ; This will simulate the function of a normal "Return".
|
||||
Goto Lable2
|
||||
EndIf
|
||||
Return
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
OnErrorGoto(?MyExitHandler)
|
||||
|
||||
X=1: Y=0
|
||||
z= X/Y
|
||||
; = a illegal division with zero
|
||||
Debug "This line should never be reached"
|
||||
End
|
||||
|
||||
MyExitHandler:
|
||||
MessageRequester("Error", ErrorMessage())
|
||||
End
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
Procedure MyErrorHandler()
|
||||
;All open files etc can be closed here
|
||||
MessageRequester("Error", ErrorMessage())
|
||||
End
|
||||
EndProcedure
|
||||
|
||||
OnErrorCall(MyErrorHandler())
|
||||
X=1: Y=0
|
||||
Z= X/Y
|
||||
;This line should never be reached
|
||||
Loading…
Add table
Add a link
Reference in a new issue