diff options
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_when_simple.txt')
-rw-r--r-- | js/scripting-lang/scratch_tests/test_when_simple.txt | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/js/scripting-lang/scratch_tests/test_when_simple.txt b/js/scripting-lang/scratch_tests/test_when_simple.txt index 3a5f9cf..3180d51 100644 --- a/js/scripting-lang/scratch_tests/test_when_simple.txt +++ b/js/scripting-lang/scratch_tests/test_when_simple.txt @@ -1,11 +1,7 @@ -/* Simple when expression test */ +/* Test simple when expression */ +factorial : n -> + when n is + 0 then 1 + _ then n * (factorial (n - 1)); -grade : score -> - when score is - 90 then "A" - 80 then "B" - 70 then "C" - _ then "F"; - -result : grade 95; -..out result; \ No newline at end of file +..out "when expression created successfully"; \ No newline at end of file |