|
|
|
|
|
by frankjr
602 days ago
|
|
> What I don't understand is the !void at the end of the declaration, if we're meant to be returning an int, surely !int would be the expected syntax (although I would prefer returns int instead). `!void` means the function can return an error (e.g. return error.BadArgument) but doesn't produce any value itself. In the case of an error in the main function, the process will exit with 1, otherwise 0. The main function can also return a value directly (return type u8 / !u8). |
|
We know that by convention, but how do we know that from
If if write will that function also get to return a u8?Also, what happened to argv/argc?