mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
22 lines
241 B
V
22 lines
241 B
V
// Build this example with
|
|
// v -live message.v
|
|
module main
|
|
|
|
import time
|
|
|
|
[live]
|
|
fn print_message() {
|
|
println('Hello! Modify this message while the program is running.')
|
|
}
|
|
|
|
fn main() {
|
|
for {
|
|
print_message()
|
|
time.sleep_ms(500)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|