mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
30 lines
302 B
V
30 lines
302 B
V
module test
|
|
|
|
const (
|
|
x = 10
|
|
y = 100
|
|
z = 1000
|
|
)
|
|
|
|
pub enum Public {
|
|
importable
|
|
shareable
|
|
}
|
|
|
|
enum Private {
|
|
storable
|
|
donwloadable
|
|
}
|
|
|
|
interface Drinker {
|
|
drink(int) string
|
|
}
|
|
|
|
pub fn sprint(dkr Drinker) {
|
|
println(drk.drink(6))
|
|
}
|
|
|
|
fn some_function_name(foo string, bar int) string {
|
|
return 'baz'
|
|
}
|