Search code examples
red-lang

How to pause program execution for some time?


I'm using "Red Programming Language" version "0.6.4" on Windows and making a command line application.

I don't know much Red language and I don't understand many things. I did go over "work in progress" docs at (https://doc.red-lang.org/en/) before asking here.

I need to see the "Something, something..." on the screen for a bit (let's say 1 second) before the command prompt window closes.

Red []

; do something
print "Something, something..."

; pause 1 // not working
; sleep 1 // not working

quit

As in the code comments I've tried with pause or sleep but I get an error Script Error: sleep has no value. How to make it sleep?

Thank you.


Solution

  • The function you are looking for is WAIT. Try wait 1.