| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Rakudo
Revision: 30861
Author: pmichaud
Date: 07 Sep 2008 13:21:37
Changes:[rakudo]: Add 'fail' function.
Files:| ... | ...@@ -57,6 +57,19 @@ | |
| 57 | 57 | .return ($P1) |
| 58 | 58 | .end |
| 59 | 59 | |
| 60 | .sub 'fail' | |
| 61 | .param pmc value :optional | |
| 62 | .param int has_value :opt_flag | |
| 63 | .local pmc result | |
| 64 | if has_value goto have_value | |
| 65 | result = '!FAIL'() | |
| 66 | goto done | |
| 67 | have_value: | |
| 68 | result = '!FAIL'(value) | |
| 69 | done: | |
| 70 | 'return'(result) | |
| 71 | .return(result) | |
| 72 | .end | |
| 60 | 73 | |
| 61 | 74 | =item die |
| 62 | 75 |