Skip to content

Commit

Permalink
Merge 293fcab into 76ca2f6
Browse files Browse the repository at this point in the history
  • Loading branch information
RauliL committed Aug 25, 2023
2 parents 76ca2f6 + 293fcab commit a7413c2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
17 changes: 17 additions & 0 deletions examples/99bottles.juokse
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env juokse

bot = 99

while [ $bot -gt 1 ]:
printf "%d bottles of beer on the wall,\n" $bot
printf "%d bottles of beer!\n" $bot
printf "You take one down, pass it around,\n"

bot = `expr $bot - 1`

printf "%d bottles of beer on the wall!\n\n" $bot

echo "1 bottle of beer on the wall,"
echo "1 bottle of beer!"
echo "You take it down, pass it around,"
echo "No more bottles of beer!"
11 changes: 11 additions & 0 deletions examples/loops.juokse
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env juokse

for i in foo bar baz:
echo $i

i = 0
while [ $i -ne 10 ]:
i = `expr $i + 1`
if [ $i -eq 3 ]:
continue
echo $i

0 comments on commit a7413c2

Please sign in to comment.