Delay function?

Jarrett Billingsley jarrett.billingsley at gmail.com
Tue Sep 2 11:26:56 PDT 2008


On Tue, Sep 2, 2008 at 1:37 PM, Chris R. Miller <
lordSaurontheGreat at gmail.com> wrote:

> Brendan wrote:
> > Jarrett Billingsley Wrote:
> >
> >
> >> </blockquote></div><br>If you're expecting it to pause after each
> character.. you're missing braces around the body of the for loop, this
> isn't Python ;)<br></div>
> >>
> >
> > Oooooh, what a foolish mistake! How could I forget that? Thanks for
> pointing it out.
> >
> > But the result isn't fruitful, though. When I run it, all I get is an
> empty screen, then after many seconds the whole string is displayed at once
> (not to mention I set the sleep time to 0.1 seconds). I'm probably missing
> something. Any idea?
>
> Flush the output?
>
>
Totally.

foreach(ch; s) { write(ch); fflush(stdout); system("pause 0.2"); }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20080902/e3eee188/attachment.htm>


More information about the Digitalmars-d-learn mailing list