2 ms·
This is the only way it can be done in statically typed language. You cannot have multiple returns without defining how many there are what are their types.
by veli_joza 11y ago
This is the only way it can be done in statically typed language. You cannot have multiple returns without defining how many there are what are their types.
- jjnoakes 11y agoThe definition of what they are and how many could just as easily be done at the function declaration. There is no requirement that multiple return types in a static language have to be declared separately and verbosely. That is just how C does it.