lyl
lyl

Reputation: 293

behavior of call in Red language

On Red console, I tried the following commands:

>> (print 0 call/shell/wait "sleep 5" print 5)

I think 0 would be printed first. After 5 seconds delay, 5 would then be printed. In fact, both 0 and 5 were printed after delay of 5s. Why?

Note: sleep.exe is an external command.

Upvotes: 0

Views: 118

Answers (1)

DocKimbel
DocKimbel

Reputation: 3199

The Red GUI console is buffering output too aggressively in order to provide fast output. A fix was just pushed, so it should now behave as you expect.

BTW, you don't need to enclose the whole line in (..), it does not change anything in the way that code line will be processed.

Upvotes: 1

Related Questions