IIRC, INFORMATION was the same as PICK used to be: varname<1,-1> = x when x
was blank did not add a value mark, whatever the contents of varname. If
INFORMATION now does as you say, then some time in the last 20+ years it
changed.
My problem is that it has changed!
----- Original Message -----
From: "Anthony Youngman" <[EMAIL PROTECTED]>
To: <[email protected]>
Cc: "Kate Stanton" <[EMAIL PROTECTED]>
Sent: Wednesday, May 24, 2006 10:19 PM
Subject: RE: [U2] Changed BASIC varname<1,-1>
Nobody seems to have mentioned the logic ...
Again, I can't speak for Pick behaviour, but in INFORMATION and its
derivatives
-1 puts the new data in a new (sub)field at the end. If it's adding to
an empty string it assumes there is no existing field and puts the new
data in (sub)field 1. Of course, if the new data is the empty string ...
you can guess what happens.
So if I start with an empty string and append a bunch of empty strings
using -1, I will end up with the empty string. But if I have ANYthing in
that string to start with, adding an empty string will result in a new
delimiter and empty string being appended.
X = @VM
X<1,-1> = ""
now gives me X equal to @VM:@VM
But
X = ""
X<1,-1> = ""
leaves me with X still equal to ""
Cheers,
Wol
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kate Stanton
Sent: 23 May 2006 23:26
To: [email protected]
Subject: Re: [U2] Changed BASIC varname<1,-1>
Thanks Ray.
We have (stupidly, it seems) relied on the -1 behaviour, using it when I
want to add a subfield if there is data, but not to add a blank
subfield.
I shall report this as a bug, but if the change in behaviour of user
number
is any guide, I don't expect much response. (sigh!)
Cheers, Kate
----- Original Message -----
From: "Ray Wurlod" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, May 23, 2006 6:51 PM
Subject: Re: [U2] Changed BASIC varname<1,-1>
It's been around for a long time, which is why $OPTIONS EXTRA.DELIM
exists. I don't often work in Pick flavor, so can't speak
authoritatively
as to what proper default behaviour ought to be. But what you
describe
is, was, and should be the default behaviour in the non-Pick flavors.
-------
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/
* ************************************************************************ *
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 8272
5300, Hong Kong + 852 2121 2388, London +44 (0)20 7351 5000 and New York +1
212 582 2333.
* ************************************************************************ *
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/