summaryrefslogtreecommitdiff
path: root/paper/intro-while.tex
diff options
context:
space:
mode:
authorCamil Staps2016-05-19 16:52:31 +0200
committerCamil Staps2016-05-19 16:52:31 +0200
commit6e7015f0efc19c993e7c48d5be49924b0e0569a4 (patch)
treeecc6543fd6d0652701dcc0dcec5cc02ee0008d70 /paper/intro-while.tex
parentMinor changes opdracht8 (diff)
Update example program
Diffstat (limited to 'paper/intro-while.tex')
-rw-r--r--paper/intro-while.tex11
1 files changed, 5 insertions, 6 deletions
diff --git a/paper/intro-while.tex b/paper/intro-while.tex
index e35c07a..30d8efd 100644
--- a/paper/intro-while.tex
+++ b/paper/intro-while.tex
@@ -45,16 +45,15 @@ ignore all whitespace, and do not allow variable names that are reserved
keywords such as \whskip.
The semantics of these syntax constructs should be intuitive. As an example,
-after executing the following program \verb$x$ will approximate \verb$y$
-divided by $2$:
+after executing the following program, \verb$y$ will have been divided by $2$:
\begin{while}
\whcomp%
- {\whass{x}{0}}
- {\whwhile{y > 0}%
+ {\whass{x}{y}}
+ {\whwhile{\whnotp{\whle{x}{0}}}%
{\whcomp%
- {x := x + 1}%
- {y := y - 2}%
+ {x := x - 2}%
+ {y := y - 1}%
}
}
\end{while}