I must admit that I usually use A[x,99999] BUT a couple of times over the
years it has come back and bitten me. 

One case was a dynamic array of item descriptions - each description was a
variable length string (average of less than 100 characters) and each array
would have (on average) say 10 or 20 items. So using ITEM.LIST[2,9999]
worked fine. But then you get the user who creates a list of well over 100
longer than average descriptions and the program starts losing the last few
when filing.

AdrianW

-----Original Message-----
From: gerry simpson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 3 February 2004 21:48
To: U2 Users Discussion List
Subject: Re: VARIABLE<-1> = '' Inconsistent behaviour


we use the A[x,9999]  as well as A["*",x,9999] constructs a lot - no
trailing characters/fields


----- Original Message ----- 
From: "Mark Johnson" <[EMAIL PROTECTED]>
To: "U2 Users Discussion List" <[EMAIL PROTECTED]>
Sent: Tuesday, February 03, 2004 8:14 AM
Subject: Re: VARIABLE<-1> = '' Inconsistent behaviour


> I worked on an application that had:
>
> A=INSERT(A,1,-1;NEWVAL:@VM)
>
> and it was tricky. You should develop your own best approach to this
concept
> of managing manual delimiters.
>
> BTW, is the -1 necessary with A=A[2,LEN(A)-1]. For that matter, could you
> use A=A[2,10000000]. My question is if the second value in [] exceeds the
> length of A are there any surprising trailing characters? I've used
> A=A[2,100000] (or some knowingly high number) with no consequences over
the
> years.
>
> my 1 cent.
> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, February 03, 2004 2:09 AM
> Subject: RE: VARIABLE<-1> = '' Inconsistent behaviour
>
>
> One easy way I sometimes use is to just concatenate a field mark along
with
> the new value and then remove the first field mark at the end... eg.
>
> A = ""
> LOOP
>    INPUT B
>    A := @FM:B
> UNTIL condition
> REPEAT
> A = A[2,LEN(A)-1]
>
> AdrianW
>
> -----Original Message-----
> From: Marco Manyevere [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 3 February 2004 15:00
> To: U2 Users Discussion List
> Subject: Re: VARIABLE<-1> = '' Inconsistent behaviour
>
>
> OK the documentation for REPLACE says something about inserting empty
> strings. For information flavour it does say the @FM will be added for
empty
> strings without making a distinction between adding to an empty or non
empty
> array.
>
> If this is a feature then it implies major code revisions for me whereever
I
> use the <-1> construct. What would be the shortest/smartest way of adding
> strings including non significant nulls? I hate to do:
>
> A = ''
> ....
> ....
> INPUT B;  * May be empty
> IF LEN(B) THEN
>    A<-1> = B
> END ELSE
>    IF LEN(A) THEN
>       A<-1> = B
>    END ELSE
>       A = @FM
>    END
> END
>
> I have also tested
>
> A<1> = ''
> A<2> = ''
> A<3> = 3
> A<4> = ''
> A<5> = 5
>
> and it inserts the @FM as expected but this involves maintaining a counter
> for the dynamic array.
>
> Louis Windsor <[EMAIL PROTECTED]> wrote:
>
> I think this is a "feature".
>
> Universe does NOT insert non-significant nulls.  In other words your first
> two
> (A<-1> = '') do not do anything!  It is consistent in its' behaviour as
you
> can
> count on it to do the above.  It has done this as long as I remember.
>
> I found this out through bitter experience.
>
> Louis
>
>
> ----- Original Message -----
> From: Marco  <mailto:[EMAIL PROTECTED]> Manyevere
> To: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> Sent: Tuesday, February 03, 2004 12:55 PM
> Subject: VARIABLE<-1> = '' Inconsistent behaviour
>
> Hi All,
>
> Consider the program:
>
> A = ''
> A<-1> = ''
> A<-1> = ''
> A<-1> = 3
> A<-1> = ''
> A<-1> = 4
> PRINT A<3>
>
> I expect it output '3' but it outputs '4'. Whats the explanation? I'm on
UV
> 9.6 [NT] running information flavour.
>
> Regards,
> Marco
>
>
>
>
>    _____
>
> BT Yahoo! Broadband - Free modem offer, sign
> <http://uk.rd.yahoo.com/evt=21064/*http://btyahoo.yahoo.co.uk> up online
> today and save £80
>
>
>
>    _____
>
>
>
>
> _______________________________________________
> u2-users mailing list
> [EMAIL PROTECTED]
> http://www.oliver.com/mailman/listinfo/u2-users
>
>
> _______________________________________________
> u2-users mailing list
> [EMAIL PROTECTED]
> http://www.oliver.com/mailman/listinfo/u2-users
>
>
>
>
>    _____
>
>
>
<http://uk.rd.yahoo.com/mail/tagline_messenger/*http://uk.messenger.yahoo.co
> m> Yahoo! Messenger - Communicate instantly..."Ping" your friends today!
>
<http://uk.rd.yahoo.com/mail/tagline_messenger/*http://uk.messenger.yahoo.co
> m/download/index.html> Download Messenger Now
>
> Disclaimer.  This e-mail is private and confidential. If you are not the
> intended recipient, please advise us by return e-mail immediately, and
> delete the e-mail and any attachments without using or disclosing the
> contents in any way. The views expressed in this e-mail are those of the
> author, and do not represent those of this company unless this is clearly
> indicated. You should scan this e-mail and any attachments for viruses.
This
> company accepts no liability for any direct or indirect damage or loss
> resulting from the use of any attachments to this e-mail.
> _______________________________________________
> u2-users mailing list
> [EMAIL PROTECTED]
> http://www.oliver.com/mailman/listinfo/u2-users
>
> _______________________________________________
> u2-users mailing list
> [EMAIL PROTECTED]
> http://www.oliver.com/mailman/listinfo/u2-users
>

_______________________________________________
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users
Disclaimer.  This e-mail is private and confidential. If you are not the
intended recipient, please advise us by return e-mail immediately, and
delete the e-mail and any attachments without using or disclosing the
contents in any way. The views expressed in this e-mail are those of the
author, and do not represent those of this company unless this is clearly
indicated. You should scan this e-mail and any attachments for viruses. This
company accepts no liability for any direct or indirect damage or loss
resulting from the use of any attachments to this e-mail.
-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users

Reply via email to