Skip to content

Commit 8a900de

Browse files
committed
update source program to match x86 code for sum of first five
1 parent 75b7fb5 commit 8a900de

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

book.tex

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10923,12 +10923,13 @@ \chapter{Loops and Dataflow Analysis}
1092310923
\begin{lstlisting}
1092410924
(let ([sum 0])
1092510925
(let ([i 5])
10926-
(begin
10927-
(while (> i 0)
10928-
(begin
10929-
(set! sum (+ sum i))
10930-
(set! i (- i 1))))
10931-
sum)))
10926+
(+ 27
10927+
(begin
10928+
(while (> i 0)
10929+
(begin
10930+
(set! sum (+ sum i))
10931+
(set! i (- i 1))))
10932+
sum))))
1093210933
\end{lstlisting}
1093310934
The \code{while} loop consists of a condition and a
1093410935
body.\footnote{The \code{while} loop is not a built-in

0 commit comments

Comments
 (0)