Re: Multi-assign

new topic     » goto parent     » topic index » view thread      » older message » newer message
DerekParnell said...

I'd prefer not to use '$' as it is already loaded with two meanings and to add a third is probably asking for future problems.

So I think we are left with the single characters ... "@%^&*?" , and maybe combinations like "[]".

{ A, ?, B }  = SomeFunc(1, ?, 2) 

That one makes the most sense to me.

Regarding $ on the RHS, to indicate omitted parameters, you cannot do that as it already has valid meaning:

sequence s 
s = {1,5,7} 
function f(object o) return o end function 
 
? s[f($)]  -- prints 7, as it should 
 
if getc(0) then end if 

Regards, Pete

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

Search



Quick Links

User menu

Not signed in.

Misc Menu