v/examples/hot_reload/message.v

22 lines
241 B
V
Raw Normal View History

2019-07-07 21:46:21 +02:00
// Build this example with
// v -live message.v
2019-07-07 21:46:21 +02:00
module main
import time
[live]
2019-07-07 21:46:21 +02:00
fn print_message() {
println('Hello! Modify this message while the program is running.')
2019-07-07 21:46:21 +02:00
}
fn main() {
for {
print_message()
time.sleep_ms(500)
2019-07-07 21:46:21 +02:00
}
}