Printing is handled by various I/O stream functions. One should know where to use them accordingly.
println: same as
eprint: same as
eprintln: same as
printlnbut the output goes to error stream (stderr).
panic: outputs and exits from the program.
This will print
Hello WorldHello V
If you want to print the next line on a new line you would have to do
print('Hello World \n')
print('Hello V ')
If you don't want to use
\nthen you can use
V supports single line comments
//and multi-line comments
/* */. They should be used for documenting the code for letting the other users know how the code works. It can also be used for temporarily commenting the code which has to be used later on.
// This is a single line comment
/* This is a
* multi-line comment
* /* This could be nested as well*/
Try uncommenting the code in
hello.vand see what happens.