From d9d307bc676387ab8894f9fb1ee722db8ecf7272 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Thu, 11 Jul 2024 15:43:18 +0100 Subject: set -> set! --- tests/mandel.bth | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'tests/mandel.bth') diff --git a/tests/mandel.bth b/tests/mandel.bth index e75d694..43dc58b 100644 --- a/tests/mandel.bth +++ b/tests/mandel.bth @@ -1,20 +1,20 @@ -(set pxy 0) +(set! pxy 0) (while (< pxy 30) - (set cim (/ (- pxy 15) 15)) - (set pxx 0) + (set! cim (/ (- pxy 15) 15)) + (set! pxx 0) (while (< pxx 60) - (set cre (/ (- pxx 40) 20)) - (set i 0) - (set zim cim) - (set zre cre) + (set! cre (/ (- pxx 40) 20)) + (set! i 0) + (set! zim cim) + (set! zre cre) (while (< i 25) - (set nzre (+ cre (- (* zre zre) (* zim zim)))) - (set nzim (+ cim (* 2 (* zre zim)))) - (set zre nzre) - (set zim nzim) - (set mag (+ (* zre zre) (* zim zim))) - (set i (if (< mag 4) (+ i 1) 999))) + (set! nzre (+ cre (- (* zre zre) (* zim zim)))) + (set! nzim (+ cim (* 2 (* zre zim)))) + (set! zre nzre) + (set! zim nzim) + (set! mag (+ (* zre zre) (* zim zim))) + (set! i (if (< mag 4) (+ i 1) 999))) (write (if (< mag 4) "#" ".")) - (set pxx (+ pxx 1))) + (set! pxx (+ pxx 1))) (say "") - (set pxy (+ pxy 1))) + (set! pxy (+ pxy 1))) -- cgit v1.2.3