Re: Multi-assign

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

Multi-assign in BASIC is:

a,b,c,d,e = 1

So you need just:

object a,b,c,d,e = 1  --- is it possible in 4.*  now ? 
-- And then you can do: 
procedure ma(object a, object b) 
 if sequence(a) then 
   for i=1 to length(a) do 
        a[i]= b 
   end for 
 elsif atom(a) and atom(b) then 
        a = b 
 else 
 end if        
end procedure 
 
ma({a,b,e}, 2) 
 
?a 
?b 
?c 
?d 
?e 

Regards


kinz

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

Search



Quick Links

User menu

Not signed in.

Misc Menu