mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
e76c8d5dc0
* fmt: use type_to_str_using_alias instead of type_to_str in struct.v * update test
29 lines
389 B
V
29 lines
389 B
V
import math { max,
|
|
min,
|
|
}
|
|
|
|
import cli { Command }
|
|
import math.complex { complex, Complex }
|
|
import os {
|
|
input, user_os, file_ext }
|
|
|
|
struct App {
|
|
command &Command
|
|
}
|
|
|
|
struct MyCommand {
|
|
Command
|
|
}
|
|
|
|
fn imaginary(im f64) Complex {
|
|
return complex(0, im)
|
|
}
|
|
|
|
fn main() {
|
|
println(max(0.1, 0.2))
|
|
println(min(0.1, 0.2))
|
|
println(user_os())
|
|
println(file_ext('main.v'))
|
|
println(imaginary(1))
|
|
}
|