0

Could anyone look at this and tell me if I got it right? I had to rewrite the following code without GOTOs:

```
Y: A
B
if a GOTO X
C
if b GOTO Y
X: D
```

Here is my solution (I added an additional flag to get it done):

```
i=TRUE
while i
A
B
if not a then
i=FALSE
else
C
if b then
i=FALSE
D
```

Please correct me if I'm doing something wrong.

Thanks, Waldis