Re: we need official libs : Swap
- Posted by JJProg at CYBERBURY.NET
Jul 20, 1999
EU>We don't need swap. What we need is the ability is sequence 'unbinding' ..
EU>Many times, people have asked for things such as:
EU>{ status, value } = get (0)
I suggest implementing this like remainder is implemented so if the
sequence lengths aren't the same, simply return an error.
I would guess that Euphoria evaluates the right side of an assignment
statement first somewhere in memory, then places the result into the
variable referenced by the left side. If this is the case, I would guess
that it would be rather easy to implement this and {a,b} = {b,a}.
EU>As well as:
EU> a + 1 = 3
EU>-- sets a to 2
EU>Surely, situations like this can be confusing:
EU>(the only problematic situations I can come up with are the use of '=')
EU> ( a = b ) = ( b = c )
I think this would be incredibly confusing and slow down the interpreter
a lot. Perhaps someone could write a math library that would solve
equations such as a+1 = 3.
EU>Comments, any one ?
EU>Robert, how do you feel about this ?
EU>Ralf N.
EU>nieuwen at xs4all.nlt
EU>http://www.xs4all.nl/~nieuwen
Jeffrey Fielding
JJProg at cyberbury.net
http://members.tripod.com/~JJProg/
|
Not Categorized, Please Help
|
|