RE: listed subscripting
- Posted by Juergen Luethje <j.lue at gmx.de> Apr 24, 2006
- 474 views
Cuvier Christian wrote: <snip> > And of course, it is a real pain not to be able to write: > > }}} <eucode> > function doSomething(sequence vars) > --... > end function > > procedure whatEver() > integer n1,n2 > sequence s1,s2,s3 > --... > {n1,n2,s1,s2,s3}=doSomething({n1,n2,s1,s2,s3}) > --... > end procedure > </eucode> {{{ > > The above code would allow to write a separate routine for what doSomething > does, avoiding the error prone, tiresome, cluttered, unelegant urrent > solution: > > }}} <eucode> > vars=doSomething({n1,n2,s1,s2,s3}) > n1=vars[1] > s1=vars[3] > --etc > </eucode> {{{ > > Rob, when will you decide to make Euphoria simple to use??? Christian, I support your suggestion. Another eample for using the proposed syntax: -- elegant swap: {a,b} = {b,a} -- current swap: temp = a a = b b = temp Regards, Juergen -- Have you read a good program lately?