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;
        boundary="----_=_NextPart_001_01C3EA37.1386B4A2"

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.

Cheers,
Wol


----------
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.

Louis

----- Original Message -----
From: <mailto:[EMAIL PROTECTED]>Marco Manyevere
To: <mailto:[EMAIL PROTECTED]>[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, <http://uk.rd.yahoo.com/evt=21064/*http://btyahoo.yahoo.co.uk>sign up online today and save 80


---------- _______________________________________________ u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users



***********************************************************************************

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
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users

_______________________________________________ u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users

Reply via email to