Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
2
Task/Exceptions/Forth/exceptions-1.fth
Normal file
2
Task/Exceptions/Forth/exceptions-1.fth
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
: f ( -- ) 1 throw ." f " ; \ will throw a "1"
|
||||
: g ( -- ) 0 throw ." g " ; \ does not throw
|
||||
4
Task/Exceptions/Forth/exceptions-2.fth
Normal file
4
Task/Exceptions/Forth/exceptions-2.fth
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
: report ( n -- ) ?dup if ." caught " . else ." no throw" then ;
|
||||
: test ( -- )
|
||||
['] f catch report
|
||||
['] g catch report ;
|
||||
2
Task/Exceptions/Forth/exceptions-3.fth
Normal file
2
Task/Exceptions/Forth/exceptions-3.fth
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
cr test
|
||||
'''caught 1 g no throw ok'''
|
||||
1
Task/Exceptions/Forth/exceptions-4.fth
Normal file
1
Task/Exceptions/Forth/exceptions-4.fth
Normal file
|
|
@ -0,0 +1 @@
|
|||
10 ['] myfun catch if drop then
|
||||
Loading…
Add table
Add a link
Reference in a new issue