V version: V 0.1.12
OS:
What did you do?
fn main() int
{
return 0
}
What did you expect to see?
nothing ;-)
What did you see instead?
/home/alf//.vlang//ex-main.c:3095:13: error: expected ‘;’ before numeric constant
return 0 0 ;
^
V panic: clang error
main shouldn't return a value :-) . Why do you want it to?
Well the language should not allow this. It's a quick fix.
main should return value to inspect return code in scripts, for example
In V you use exit(code) for this
ok, agreed then
Fixed:
fn main must have no arguments and no return values
ok, agreed. nice for embedded systems
So exit() is/becomes a builtin function?
args will come via a os module?
Is the plan to get rid of accessing C lib via C.function interface? Or will this stay part of V?
Most helpful comment
In V you use
exit(code)for this