Re: Generic symbolic sequence assignment

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

Probably, in this specific case. However, the LHS generic symbolic sequence shows its usefulness when the RHS is a function that returns a generic sequence.

Yes, I was thinking of that, but I'm not yet sure of practical that might be.

Here is an obviously contrived example, but it does highlight problems with functions that return different structures based on the input data.

function FUNC(object x) 
  if x > 0 then 
      return {x, {x * x, sqrt(x)}} 
  elsif x = 0 then 
      return x 
  else 
      return {-x, x * x} 
  end if 
end function 
 
{a,{b,c}} = FUNC( userdata ) 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu