V Forum

[ log in ]

Change in syntax with Version 0.1.25

dschinn1001 Feb 22 20:54
Hi all, it seems that there is now a change in syntax for V - we have to embedd our little snippets always inside - into as follows :

fn main() {
your code is here
}

Here is an example with for-loop :

fn main() {
mut num := 0
for {
num++
if num >=
10000 {
break
}
}
println ("Dunno !!!")
}



Powered by Vorum, open-source blogging/forum software written in V