Hmmm... That leads to an interesting idea.  If you consider a space to be
'something', then test.1 is really the only 'empty' array, and the following
would work, without doing any trims or conversions:

IF SUM(SUM(NES(TEST.x,REUSE('')))) THEN  (string is not empty) 

You could also make it work, considering spaces to be empty by amending it
thusly:

IF SUM(SUM(NES(CONVERT(' ','',TEST.x),REUSE('')))) THEN  (string is not
empty) 

Remember: eschew obfuscation  ;-)

Larry Hiscock
Western Computer Services


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of john reid
Sent: Wednesday, February 01, 2006 10:39 AM
To: [email protected]
Subject: Re: [U2] Is a dynamic array "empty" or not?

Me too, 'cause TEST.2 isnt empty I dont think. Unless blanks are not
'something'
I always use EQS or NES functions for evaluation.  Just make an array
using the same delimiters, and say
TEST.3 = @VM:@AM:' ':@VM:'zzz':@VM:@AM:'abc':@AM
TEST.1 = @VM:@AM:@VM:@VM:@AM:@AM
TEST.2 = @VM:@AM:' ':@VM:'  ':@VM:@AM:'   ':@AM
XYZ=EQS(TEST.1,TEST.3)
CRT XYZ

1}1~0}0}1~0~1
OR...
am I missing something?
j

On 2/1/06, Wendy Smoak <[EMAIL PROTECTED]> wrote:
> I'm probably missing something obvious here...
> What can I use to evaluate the "emptiness" of these arrays, so that 1
> and 2 are considered empty and 3 is not?
>
>   TEST.1 = @VM:@AM:@VM:@VM:@AM:@AM
>   TEST.2 = @VM:@AM:' ':@VM:'  ':@VM:@AM:'   ':@AM
>   TEST.3 = @VM:@AM:' ':@VM:'zzz':@VM:@AM:'abc':@AM
>
> Thanks!
> Wendy Smoak
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
>


--
john
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to