diff options
author | bd-912 <bdunahu@colostate.edu> | 2024-04-10 23:40:25 -0600 |
---|---|---|
committer | bd-912 <bdunahu@colostate.edu> | 2024-04-10 23:40:25 -0600 |
commit | 1080b37bbe40fe56b919d22804c159cccdca3c95 (patch) | |
tree | 8ddbb9528f575e537f925b266c8f366be6acc8b7 /vaporize/tests/Factorial.vapor | |
parent | 61a28b7f8e709d1884ccab15f0dc38ed19dfde70 (diff) |
Library rename, created A4 directories
Diffstat (limited to 'vaporize/tests/Factorial.vapor')
-rw-r--r-- | vaporize/tests/Factorial.vapor | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/vaporize/tests/Factorial.vapor b/vaporize/tests/Factorial.vapor deleted file mode 100644 index 28e1126..0000000 --- a/vaporize/tests/Factorial.vapor +++ /dev/null @@ -1,30 +0,0 @@ - -const vmt_Fac - :Fac.ComputeFac - - -func Main() - t.0 = HeapAllocZ(4) - [t.0] = :vmt_Fac - if t.0 goto :null1 - Error("null pointer") - null1: - t.1 = [t.0] - t.1 = [t.1+0] - t.2 = call t.1(t.0 10) - PrintIntS(t.2) - ret - -func Fac.ComputeFac(this num) - t.0 = LtS(num 1) - if0 t.0 goto :if1_else - num_aux = 1 - goto :if1_end - if1_else: - t.1 = [this] - t.1 = [t.1+0] - t.2 = Sub(num 1) - t.3 = call t.1(this t.2) - num_aux = MulS(num t.3) - if1_end: - ret num_aux |