I've tried your sample in fsi running in Emacs, and it works fine; this ellipsis is printed immediately. I guess it's a problem with the VS plugin (could you try and run the compiled version?), and you won't find a function that fixes your problem.

By on 11/7/2009 6:44 PM ()

Thanks, yes... also works for me in the console fsi, and as a ".exe". Only a problem within VS.

It also works without the stdout.Flush

(for i in seq { 1..20 } do printf "%d..." i; Thread.Sleep(1000)); printfn "done";;

By on 11/7/2009 6:58 PM ()

Thanks for the help. I'll send a report to the F# team. I'd like the VS plugin to either pickup the behavior seen in fsi.exe or a compiled F# program or they could implement some kind of function to force output to the screen.

By on 11/8/2009 1:46 PM ()

I don't have a solution - just posting to confirm the problem.

i tried:

1
(for i in seq { 1..20 } do printf "%d..." i; Thread.Sleep(1000); stdout.Flush()); printfn "done";; 

I changed it to include the stdout.Flush, and also bracket the for loop so to exclude the printfn

Yep - nothing is printed until the printfn.

By on 11/7/2009 6:29 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper