I'm not sure this would work, as the UniData documentation for "EQS" states:
The UniBasic EQS function compares each value in array1 to its corresponding
value in array2. UniData returns an array with 1 in each position where
values are
equal, and 0 in each position for values that are not equal.
Thus, if the following...
ARRAY1 = '11':@VM:'12':@VM:'13':@VM:'20':@VM:'21'
ARRAY2 = '11':@VM:'12':@VM:'13':@VM:'19':@VM:'22'
ARRAY3 = EQS(ARRAY1,ARRAY2)
...then the resultant ARRAY3 would look like:
'1':@VM:'1':@VM:'1':@VM:'0':@VM:'0'
On the other hand, the following...
ARRAY1 = '11':@VM:'12':@VM:'13':@VM:'20':@VM:'21'
ARRAY2 = '11':@VM:'12':@VM:'13':@VM:'20':@VM:'21'
ARRAY3 = EQS(ARRAY1,ARRAY2)
...would assign ARRAY3 to look like:
'1':@VM:'1':@VM:'1':@VM:'1':@VM:'1'
...and:
SUM(ARRAY3)
...would equal 5, which would only indicate equality if
SUM(ARRAY3) = DCOUNT(ARRAY3, @VM)
Does this make sense? With mixed @AMs & @VMs I suspect one would have
to loop through the result array comparing.
Is UniData different than UniVerse?
Bill
------------------------------------------------------------------------
----- Original Message -----
*From:* [email protected]
*To:* U2 Users List <[email protected]>
*Date:* 7/23/2012 1:17 PM
*Subject:* Re: [U2] Comparing Two Dyamic Arrays
Try:
ResultArray = EQS(Array1, Array2)
If sum(ResultArray)=0 then samething = true else samething = false
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of George Gallen
Sent: 23 July 2012 09:17
To: U2 Users List
Subject: Re: [U2] Comparing Two Dyamic Arrays
Does len(array1)=len(array2) ?
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Bill Brutzman
Sent: Friday, July 20, 2012 4:23 PM
To: U2 Users List
Subject: [U2] Comparing Two Dyamic Arrays
Begin case
Case array1 = array2 ; sameThing = true
Case 1 ; sameThing = false
End case
When I tried to use an equals sign... I did not get the right answer.
While the COMPARE function works ok... and I presume that it is a
compiler thing...
It is not clear to me why the equals sign has been disempowered.
Insights would be appreciated.
--Bill
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users