diff options
author | Mathias Magnusson <mathias@magnusson.space> | 2025-08-04 16:55:16 +0200 |
---|---|---|
committer | Mathias Magnusson <mathias@magnusson.space> | 2025-08-04 16:56:00 +0200 |
commit | 0cd88f7549afbaab837392f8fc3e5b537551d5b8 (patch) | |
tree | 151cbcb56f5e8e8077f8b5621e30925498bca5ca /ternary.hgn | |
parent | 72c7be04a6d4ad126b46a977178a0e6e8d69e308 (diff) | |
download | huginn-0cd88f7549afbaab837392f8fc3e5b537551d5b8.tar.gz |
allow if expressions to evaluate to either value
Diffstat (limited to 'ternary.hgn')
-rw-r--r-- | ternary.hgn | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ternary.hgn b/ternary.hgn new file mode 100644 index 0000000..3740fd8 --- /dev/null +++ b/ternary.hgn @@ -0,0 +1,4 @@ +main := proc() { + print(if read_int(0) 1 else 2) + if 1 exit(0) +} |