Re: Pass by Reference

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

Obviously, the first can be verified as incorrect by the parser.
The second can only be determined to be wrong at runtime, and will result in a crash.

It would probably not be difficult to collect min/max/unknown lengths of returned sequences, so as long as you don't build return values using append() etc, it should be just as easy to check (at parse time).

dcuny said...

you can't see how many values a function is returning.

You can do this:

function foo() 
   return {1, 2, 3} 
end function 
 
sequence check = foo() 
if length(check)>=4 then 
    {a, b, c, d} = check 
end if 

Pete

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

Search



Quick Links

User menu

Not signed in.

Misc Menu