vig/examples/hello.v

75 lines
653 B
V

const (
Cock = 1
Ball = 2 + 3
Deals = 3
Businesses = 4
)
struct Point {
x int
y int
}
fn main(a int) int {
1 + 2 + 3 + 4
1 + 1 * 1
3 / (51 + 2)
mut a := 1+2
a = 2
if a {
println(30)
} else {
println(50)
}
a && b
a || b
loop {}
loop {
println('Ballse')
}
loop a > 2 {}
loop a > 2 {
println('skirts')
}
test('asd', 1, 2, 3)
return 23
p := Point.{
x: 10
y: 20
}
p.x = 69
println(a.b(3).c(d))
v()()()
str := 'hello'
len := str.len
str.len = str.len + 1
// str.len += 1
}
fn (v Typ) voidfunc() {}
struct Foo {
a int
mut:
b int
c int
pub:
d int
pub mut:
e int
pub mut mut:
f int
}