Re: Pass by Reference

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

So, i request the comma way of writing the returned values. Also, not crashing when doing

a,b,c = return(1,2) ; a=1, b=2, c becomes some default value

Actually, it shouldn't even compile.

Well, that is true at the moment, yes.

dcuny said...

Could you give an example of where you think you might encounter this use case?

- David

Just off the top of my head:

,v = value("1234")
(even defaulted_value() and get() can return a two-part sequence)

i,,, = int_to_bytes(999) -- i want just the lowest byte

useless

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

Search



Quick Links

User menu

Not signed in.

Misc Menu