In universe, the -1 is specifically tested for appending, not an "accident" as indicated (in scd.c) Maybe that is how it worked in Pick, but not in PI or UV.

At 04:21 AM 02/03/2004, you wrote:
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;

It was this way on PI as well.

Bear in mind that the <-1> syntax was an "accident" - as originally implemented the search mechanism simply decremented to zero or the end of the string, and some bright spark realised that if you started with a negative number then it would always hit the end of the string rather than zero. So the counter-intuitive result that appending null to null gives null isn't so strange. This behaviour is probably copied from "original Pick".

We get round it by initialising the variable to "*", and then doing a DEL <1> when we've finished.


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Louis Windsor
Sent: 03 February 2004 06:17
To: U2 Users Discussion List
Subject: Re: VARIABLE<-1> = '' Inconsistent behaviour

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.


----- Original Message -----
From: <mailto:[EMAIL PROTECTED]>Marco Manyevere
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

I expect it output '3' but it outputs '4'. Whats the explanation? I'm on UV 9.6 [NT] running information flavour.


BT Yahoo! Broadband - Free modem offer, <*>sign up online today and save 80

---------- _______________________________________________ u2-users mailing list [EMAIL PROTECTED]


This transmission is intended for the named recipient only. It may contain private and confidential information. If this has come to you in error you must not act on anything disclosed in it, nor must you copy it, modify it, disseminate it in any way, or show it to anyone. Please e-mail the sender to inform us of the transmission error or telephone ECA International immediately and delete the e-mail from your information system.

Telephone numbers for ECA International offices are: Sydney +61 (0)2 9911 7799, Hong Kong + 852 2121 2388, London +44 (0)20 7351 5000 and New York +1 212 582 2333.

u2-users mailing list

_______________________________________________ u2-users mailing list [EMAIL PROTECTED]

Reply via email to