main()
, but it doesn't look like you can, according to stackoverflow. Functions also can't be defined inside of other functions. For example, you can't define your function when it's in main()
. You have to define it outside of main()
.
The main function has an integer type, so in the end it return a number, usually 0. Other functions can have other types, though. We have the void type, where the function returns nothing. There's integer, there's also probably boolean, string, array, and possibly more.
The website mentions the question "Can my function return multiple values using a return statement?". It says no, but it also says that there are workarounds for that. Probably arrays and parsing them after they are returned.
No comments:
Post a Comment