Re: [U2] Comparing Two Dynamic Arrays

2012-07-20 Thread Israel, John R.
Does one have an extra but empty attribute?

For testing only, try comparing array1 = array1 and see what you get.

John Israel

Sent from my iPhone

On Jul 20, 2012, at 8:57 PM, "Bill Brutzman"  wrote:

> 1. These are Dynamic Arrays... as indicated in the Subject field of the 
> original post.
> 2. Yes... I also expected the equals to work... it does not... that why I 
> wrote.
> 
> --Bill
> 
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org 
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Woodward, Bob
> Sent: Friday, July 20, 2012 6:44 PM
> To: U2 Users List
> Subject: Re: [U2] Comparing Two Dynamic Arrays
> 
> Is it a DIM array or a DYNAMIC array?  I would think that a DIM array would 
> probably be false because it's space is assigned in memory using initial 
> values of whatever data was in that location.  I would expect a DYNAMIC array 
> to work, though, as it's really just a single location in memory.  No proof 
> but that's what I'd expect, anyway.
> 
> BobW
> 
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Brutzman
> Sent: Friday, July 20, 202 1: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
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users
> ___
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users
> ___
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users
> 
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Comparing Two Dyamic Arrays

2012-07-20 Thread Wjhonson

Universe 10.3

FFT.BP 'TESTEQ'

0001 A = "2.2":@VM:"2.20"
0002 B = 2.2:@VM:2.2
0003 IF A = B THEN PRINT "YES" ELSE PRINT "NO"
0004 PRINT COMPARE(A,B,"R")


Output result

NO
0

The NO indicates the string array and the numeric array are NOT the same
The "0" however indicates that as far as COMPARE on "R"ight justification they 
ARE the same

>From a mathematical standpoint, they are the same, we can see that.  The 
>system does not force a match however on a straight equality test.
COMPARE with Right just does something different however



-Original Message-
From: Bill Brutzman 
To: U2 Users List 
Sent: Fri, Jul 20, 2012 5:37 pm
Subject: Re: [U2] Comparing Two Dyamic Arrays


Will;
. Thanks for writing.
. I tried the true and false via the equate statement... and also tried it with 
 and 0.   All of the gory code was not included.
. In U2, it is not clear to me what is meant by "Normalizing".
--Bill
-Original Message-
rom: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] 
n Behalf Of Wjhonson
ent: Friday, July 20, 2012 5:30 PM
o: u2-users@listserver.u2ug.org
ubject: Re: [U2] Comparing Two Dyamic Arrays

) You have not set the values of true and false correctly
) You are comparing numeric strings without normalizing them

-Original Message-
rom: Bill Brutzman 
o: U2 Users List 
ent: Fri, Jul 20, 2012 1:49 pm
ubject: [U2] Comparing Two Dyamic Arrays

egin case
Case array1 = array2  ;  sameThing = true
Case 1;  sameThing = false
d   case
hen I tried to use an equals sign... I did not get the right answer.
hile the COMPARE function works ok... and I presume that it is a compiler 
ing...
t is not clear to me why the equals sign has been disempowered.
nsights would be appreciated.
-Bill
_
-Users mailing list
-us...@listserver.u2ug.org
tp://listserver.u2ug.org/mailman/listinfo/u2-users
___
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users
__
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Comparing Two Dyamic Arrays

2012-07-20 Thread Wjhonson

When you compare numeric strings you can get odd results if you do not first 
*normalize* them into pure numbers, instead of strings.

You can force this by doing something like A = A + 0, but for an array you 
would have to act upon each multivalue singly.
This is what the COMPARE function does itself in right justification mode, but 
a normal equate will *not* do the same way



-Original Message-
From: Bill Brutzman 
To: U2 Users List 
Sent: Fri, Jul 20, 2012 5:37 pm
Subject: Re: [U2] Comparing Two Dyamic Arrays


Will;
. Thanks for writing.
. I tried the true and false via the equate statement... and also tried it with 
 and 0.   All of the gory code was not included.
. In U2, it is not clear to me what is meant by "Normalizing".
--Bill
-Original Message-
rom: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] 
n Behalf Of Wjhonson
ent: Friday, July 20, 2012 5:30 PM
o: u2-users@listserver.u2ug.org
ubject: Re: [U2] Comparing Two Dyamic Arrays

) You have not set the values of true and false correctly
) You are comparing numeric strings without normalizing them

-Original Message-
rom: Bill Brutzman 
o: U2 Users List 
ent: Fri, Jul 20, 2012 1:49 pm
ubject: [U2] Comparing Two Dyamic Arrays

egin case
Case array1 = array2  ;  sameThing = true
Case 1;  sameThing = false
d   case
hen I tried to use an equals sign... I did not get the right answer.
hile the COMPARE function works ok... and I presume that it is a compiler 
ing...
t is not clear to me why the equals sign has been disempowered.
nsights would be appreciated.
-Bill
_
-Users mailing list
-us...@listserver.u2ug.org
tp://listserver.u2ug.org/mailman/listinfo/u2-users
___
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users
__
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Comparing Two Dynamic Arrays

2012-07-20 Thread Ed Clark
Have you tried examining the strings?

The equal sign will work if the 2 strings are the same. But they can be equal 
as dynamic arrays while not equal as strings. For example, on universe:

0001 A="1":@AM:"2"
0002 B="1":@AM:" 2 "
0003 CRT A=B
0004 CRT EQS(A,B)

prints:
0
1^1

The 2 dynamic arrays aren't equal as strings, but they are as dynamic arrays, 
because universe ignores leading/trailing spaces in numeric conversion. 
Similarly:

0001 A="1":@AM:"2":@VM
0002 B="1":@AM:"2"
0003 CRT A=B
0004 CRT EQS(A,B)

print:
0
1^1]1

they are different strings, but eqs() treats empty and missing values as the 
same.


On Jul 20, 2012, at 6:43 PM, Woodward, Bob wrote:

> Is it a DIM array or a DYNAMIC array?  I would think that a DIM array
> would probably be false because it's space is assigned in memory using
> initial values of whatever data was in that location.  I would expect a
> DYNAMIC array to work, though, as it's really just a single location in
> memory.  No proof but that's what I'd expect, anyway.
> 
> BobW
> 
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Brutzman
> Sent: Friday, July 20, 2012 1: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
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users
> ___
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Comparing Two Dynamic Arrays

2012-07-20 Thread Bill Haskett

Bill:

I'm wondering if there are trailing attributes in one array vs the other 
array.  I use such code as you've posted many times.  I'd hate to think 
such basic functionality can get broken.


Bill


- Original Message -
*From:* bi...@hkmetalcraft.com
*To:* U2 Users List 
*Date:* 7/20/2012 4:57 PM
*Subject:* Re: [U2] Comparing Two Dynamic Arrays

1. These are Dynamic Arrays... as indicated in the Subject field of the 
original post.
2. Yes... I also expected the equals to work... it does not... that why I wrote.

--Bill

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Woodward, Bob
Sent: Friday, July 20, 2012 6:44 PM
To: U2 Users List
Subject: Re: [U2] Comparing Two Dynamic Arrays

Is it a DIM array or a DYNAMIC array?  I would think that a DIM array would 
probably be false because it's space is assigned in memory using initial values 
of whatever data was in that location.  I would expect a DYNAMIC array to work, 
though, as it's really just a single location in memory.  No proof but that's 
what I'd expect, anyway.

BobW

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Brutzman
Sent: Friday, July 20, 202 1: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
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Comparing Two Dyamic Arrays

2012-07-20 Thread Bill Brutzman
Will;
0. Thanks for writing.
1. I tried the true and false via the equate statement... and also tried it 
with 1 and 0.   All of the gory code was not included.
2. In U2, it is not clear to me what is meant by "Normalizing".

--Bill

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Friday, July 20, 2012 5:30 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Comparing Two Dyamic Arrays


1) You have not set the values of true and false correctly
2) You are comparing numeric strings without normalizing them



-Original Message-
From: Bill Brutzman 
To: U2 Users List 
Sent: Fri, Jul 20, 2012 1:49 pm
Subject: [U2] Comparing Two Dyamic Arrays


Begin case
 Case array1 = array2  ;  sameThing = true
 Case 1;  sameThing = false
nd   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 
hing...
It is not clear to me why the equals sign has been disempowered.
Insights would be appreciated.
--Bill
__
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Comparing Two Dynamic Arrays

2012-07-20 Thread Bill Brutzman
1. These are Dynamic Arrays... as indicated in the Subject field of the 
original post.
2. Yes... I also expected the equals to work... it does not... that why I wrote.

--Bill

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Woodward, Bob
Sent: Friday, July 20, 2012 6:44 PM
To: U2 Users List
Subject: Re: [U2] Comparing Two Dynamic Arrays

Is it a DIM array or a DYNAMIC array?  I would think that a DIM array would 
probably be false because it's space is assigned in memory using initial values 
of whatever data was in that location.  I would expect a DYNAMIC array to work, 
though, as it's really just a single location in memory.  No proof but that's 
what I'd expect, anyway.

BobW

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Brutzman
Sent: Friday, July 20, 202 1: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
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Comparing Two Dynamic Arrays

2012-07-20 Thread Woodward, Bob
Is it a DIM array or a DYNAMIC array?  I would think that a DIM array
would probably be false because it's space is assigned in memory using
initial values of whatever data was in that location.  I would expect a
DYNAMIC array to work, though, as it's really just a single location in
memory.  No proof but that's what I'd expect, anyway.

BobW

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Brutzman
Sent: Friday, July 20, 2012 1: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
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Comparing Two Dyamic Arrays

2012-07-20 Thread Wjhonson

1) You have not set the values of true and false correctly
2) You are comparing numeric strings without normalizing them



-Original Message-
From: Bill Brutzman 
To: U2 Users List 
Sent: Fri, Jul 20, 2012 1:49 pm
Subject: [U2] Comparing Two Dyamic Arrays


Begin case
 Case array1 = array2  ;  sameThing = true
 Case 1;  sameThing = false
nd   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 
hing...
It is not clear to me why the equals sign has been disempowered.
Insights would be appreciated.
--Bill
__
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


[U2] Comparing Two Dyamic Arrays

2012-07-20 Thread Bill Brutzman
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
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


[U2] If dynamic files NEVER have to be resized ...

2012-07-20 Thread Dave Laansma
... then always create all dynamic files with a module of 1.  This seems
logical and easy for the administrator.

 

I think this is ludicrous (because I needed a laugh this morning) and
proves the point that modulo is an essential part of a properly defined
and well configured dynamic file.

 

Sincerely,

David Laansma

 

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users