Mail Archives: djgpp/1994/10/10/17:31:58
On Sun, 9 Oct 1994, Curtiss Cicco wrote:
> > do {
> > FixRotate(x,y,angle,&x,&y);
> > PutPixel(FixWhole(x)+160, FixWhole(y)+120, 15);
> > while(kbhit() == 0);
> > } while(getch() != 'q');
> > CloseVGA();
> >}
> From the way I see it, a "do" needs to be put up at the top of the
> code to create a nested do while. Look at the "while(getch() != 'q');"
> part, it's supposed to perform a loop until it evaluates to true, which
> in this case it automatically evaluates to true and goes onto CloseVGA().
No, it does a loop until it evaluates to FALSE.
> On second thought, you may o r may not need to make a nested do, but
> assuming that CloseVGA() means "stop do ing graphics" or something close
> to that effect, you need to make the condition inside the second 'while'
> initially evaluate to false instead of true and that should take care of
> the problem of premature control termination.
The problem is _not_ premature control termination. it goes on until I
press 'q' and then it quits. the problem is that the radius of the
circle goes to less than 2 in only 10 iterations after starting at 100.
Kim
- Raw text -