diff options
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_grade.txt')
-rw-r--r-- | js/scripting-lang/scratch_tests/test_grade.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/scripting-lang/scratch_tests/test_grade.txt b/js/scripting-lang/scratch_tests/test_grade.txt new file mode 100644 index 0000000..730987c --- /dev/null +++ b/js/scripting-lang/scratch_tests/test_grade.txt @@ -0,0 +1,15 @@ +/* Test grade function */ +grade : score -> + when score is + 90 then "A" + 80 then "B" + 70 then "C" + _ then "F"; + +result1 : grade 95; +result2 : grade 85; +result3 : grade 65; + +..out result1; +..out result2; +..out result3; \ No newline at end of file |