Re: Pass by Reference

new topic     » goto parent     » topic index » view thread      » older message » newer message

I'd only been considering the case

<MULTIPLE_ASSIGNMENT> = FUNCTION() 

If FUNCTION() doesn't return multiple values, the compiler knows it's an error.

Of course, there's a nasty exception to this:

<MULTIPLE_ASSIGNMENT> = call_func() 

This obviously can't be caught at compile time, so would need some sort of runtime check to make sure things are balanced.

Anything of the more general form:

<MULTIPLE_ASSIGNMENT> = <EXPRESSION> 

is illegal at compile time, because there's no <EXPRESSION> that can return multiple values (yet).

Am I misunderstanding something here?

- David

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu