From 2b8cf5e771cac4c2b087dc96a7ca05a459f630b5 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Wed, 7 Feb 2018 09:26:36 -0500 Subject: conditionals, returns, cleaner code --- script | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'script') diff --git a/script b/script index b31a18e..3b807a2 100644 --- a/script +++ b/script @@ -1,5 +1,17 @@ +func inc + set arg0 (arg0 + 1) + ret arg0 +end + set a 0 do - put a - set a (a+1) -while (a<5) + inc a > a + if ((a % 9) == 0) + put a + end +while (a < 100) + +if (a == 100) + put "All good!" +end + -- cgit v1.2.3