-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// return.l1com | ||
//Brackets - return | ||
// | ||
#include <intr.l1h> | ||
#include <bool.l1h> | ||
(main func) | ||
#var ~ main | ||
|
||
(set int64 1 zero 0) | ||
(set int64 1 x~ 0) | ||
(set bool 1 Bret~) | ||
(set int64 1 f~) | ||
(set string s zerostr~ " is zero") | ||
(set string s notzerostr~ " is not zero") | ||
|
||
print_i (x~ ) | ||
(x~ :iszero !) | ||
(Bret~ stpopi) | ||
(((Bret~ true ==) f~ =) f~ if+) | ||
print_s (zerostr~) | ||
print_n | ||
(else) | ||
print_s (notzerostr~) | ||
print_n | ||
(endif) | ||
(exit zero) | ||
(funcend) | ||
|
||
(iszero func) | ||
#var ~ iszero | ||
|
||
(set int64 1 zero~ 0) | ||
(set int64 1 num~ 0) | ||
(set bool 1 Bret~) | ||
(set int64 1 f~ 0) | ||
|
||
(num~ stpopi) | ||
(((num~ zero~ ==) f~ =) f~ if+) | ||
(true Bret~ =) | ||
(Bret~ stpushi) | ||
(return) | ||
(else) | ||
(false Bret~ =) | ||
(Bret~ stpushi) | ||
(return) | ||
(endif) | ||
(funcend) |