RE: Swap array values? In UV

2004-02-17 Thread Barry Brevik
Within BASIC, try array(x)=BITXOR(array(x),array(y)); array(y)=BITXOR(array(y),array(x)); array(x)=BITXOR(array(x),array(y)); It only works with integers. Other real numbers and strings won't work. -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users

Re: Swap array values? In UV

2004-02-16 Thread FFT2001
In a message dated 2/13/2004 11:10:14 AM Pacific Standard Time, [EMAIL PROTECTED] writes: Within BASIC, try array(x)=BITXOR(array(x),array(y)); array(y)=BITXOR(array(y),array(x)); array(x)=BITXOR(array(x),array(y)); No temp variable used. ROFL. Nice way to take a simple process and

RE: Swap array values? In UV

2004-02-16 Thread Brian Leach
It's an 'old as the hills' C programmers' trick Which is no relection on Glenn of course ... Brian -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: 16 February 2004 16:47 To: [EMAIL PROTECTED] Subject: Re: Swap array values

RE: Swap array values? In UV

2004-02-13 Thread Dave Davis
I understand why this works, but honestly, that's nasty. array(x)=BITXOR(array(x),array(y)); array(y)=BITXOR(array(y),array(x)); array(x)=BITXOR(array(x),array(y)); No temp variable used. Our company accepts no liability for the content of this email, or for the consequences of any actions

RE: Swap array values? In UV

2004-02-13 Thread Glenn Herbert
*lol* i agree it's nasty and not readily obvious as to it's intent, but that wasn't the question posed... sometimes it's just to exercise the mind At 02:36 PM 02/13/2004, you wrote: I understand why this works, but honestly, that's nasty. array(x)=BITXOR(array(x),array(y));

RE: Swap array values? In UV

2004-02-13 Thread Leroy Dreyfuss
UniVerse 10.0.x and higher have the SWAP command in BASIC. Please refer to our documentation regarding its use. -- original message -- Is there a command to swap two array contents? Like matswap array(x,y) will swap the contents of array(x) - array(y) and array(y) - array(x) Without using

RE: Swap array values? In UV

2004-02-13 Thread George Gallen
6 but it did compile. I tried swap mat a(1),mat a(2), that did not compile. -Original Message- From: Leroy Dreyfuss [mailto:[EMAIL PROTECTED] Sent: Friday, February 13, 2004 5:18 PM To: [EMAIL PROTECTED] Subject: RE: Swap array values? In UV UniVerse 10.0.x and higher have

RE: Swap array values? In UV

2004-02-13 Thread Leroy Dreyfuss
PROTECTED] Sent: Friday, February 13, 2004 5:18 PM To: [EMAIL PROTECTED] Subject: RE: Swap array values? In UV UniVerse 10.0.x and higher have the SWAP command in BASIC. Please refer to our documentation regarding its use. -- original message -- Is there a command to swap two array contents? Like

RE: Swap array values? In UV

2004-02-13 Thread Glenn W. Paschal
Of Glenn Herbert Sent: Friday, February 13, 2004 2:25 PM To: U2 Users Discussion List Subject: RE: Swap array values? In UV *lol* i agree it's nasty and not readily obvious as to it's intent, but that wasn't the question posed... sometimes it's just to exercise the mind At 02:36 PM 02/13/2004, you

Re: Swap array values? In UV

2004-02-13 Thread Results
PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Glenn Herbert Sent: Friday, February 13, 2004 2:25 PM To: U2 Users Discussion List Subject: RE: Swap array values? In UV *lol* i agree it's nasty and not readily obvious as to it's intent, but that wasn't the question posed... sometimes it's just