2019-07-07 22:46:21 +03:00
|
|
|
// Build this example with
|
2019-09-21 21:38:12 +03:00
|
|
|
// v -live message.v
|
2019-07-07 22:46:21 +03:00
|
|
|
module main
|
|
|
|
|
2019-09-28 20:42:29 +03:00
|
|
|
import os
|
2019-07-07 22:46:21 +03:00
|
|
|
import time
|
|
|
|
|
2019-09-21 21:38:12 +03:00
|
|
|
[live]
|
2019-07-07 22:46:21 +03:00
|
|
|
fn print_message() {
|
2019-09-21 21:38:12 +03:00
|
|
|
println('Hello! Modify this message while the program is running.')
|
2019-07-07 22:46:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2019-09-28 20:42:29 +03:00
|
|
|
os.clear()
|
2019-07-07 22:46:21 +03:00
|
|
|
for {
|
|
|
|
print_message()
|
2019-09-21 21:38:12 +03:00
|
|
|
time.sleep_ms(500)
|
2019-07-07 22:46:21 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|