The Universe editor seems to handle it, but if I write a BASIC program to 
"display" the line to my screen, it's truncated

So it seems a bit of this and a bit of that.
One systems programmer said hey let's fix it here, and didn't tell their 
colleague in the next cube.

-----Original Message-----
From: u2ug <>
To: U2 Users List <>
Sent: Fri, Jul 13, 2012 12:20 pm
Subject: Re: [U2] trimming a list (a test of your ability)

Yep - I've run into that at some time as well.
 seem to remember this being a problem with the editor or with
eading/writing values to an mv file rather than internal string
f you re-edit the source, do you find that it has been split into :
02 ":CHAR(255):"CAT"

----Original Message-----
rom:] On Behalf Of Wjhonson
ent: Friday, July 13, 2012 1:49 PM
ubject: Re: [U2] trimming a list (a test of your ability)

ell I'll be a horned toad.
owever try this
01 PRINT "DOG":CHAR(255):"CAT"
p arrow mode
01 PRINT "DOG ":CHAR(255):"CAT"
No closing quote
The compiler doesn't see the FF as the same "sort" of thing as other
haracters even if the editor does

----Original Message-----
rom: u2ug <>
o: U2 Users List <>
ent: Fri, Jul 13, 2012 10:43 am
ubject: Re: [U2] trimming a list (a test of your ability)

ust to be complete :
or j=0 to 255
  if char(j)='x' then continue
  if j=0 or l#7 or p#5 then
      crt "j=":j
      crt " x  =[":x:"]"
      crt " len=":l
      crt " pos=":p
-----Original Message-----
 Behalf Of u2ug
nt: Friday, July 13, 2012 1:10 PM
: U2 Users List
bject: Re: [U2] trimming a list (a test of your ability) For universe,
 believe that used to be true - I seem to recall running into his maybe
5+(?) years ago.
also seem to recall that the resolution to this issue was, as was
entioned, repending all strings with a length.
ry it:
crt "[":x:"]"
crt len(x)
crt index(x,"x",1)
abc xyz]

----Original Message-----
 Behalf Of Wjhonson
nt: Friday, July 13, 2012 12:27 PM
bject: Re: [U2] trimming a list (a test of your ability)
 string is stored in a fixed length *spot*, and is ended by an FF.
is is *why* if you actually try to create a string in BASIC (or read
ne) with n embedded FF in it, the runtime will "truncate" the string It
oesn' actually runcate the variable spot, what it does is fool the
un-time into thinking ou've hit the "end" of the string so it ignores
nything else after it thinking t's leftover garbage from trimming or
o initially let's say you get a "spot" of 8 bytes which is the default
ize of ny variable, if you're string is only 8, it will then allocate
ou 50 bytes, nd *move* the string into that new spot and the old spot
ill just be a direct ointer to the new spot.
f you exceed 50 bytes, it then *allocates* you a new *spot* of 250
ytes lsewhere, and the original 8 byte spot now points at the new spot
nd so on.  
owever, as it scans the string looking for the *end*, if it encounters
n FF, hat's the end.
e run-time will also garbage-collect the old spots by the way, for use
s ther things.
'd be surprised if it actually wastes effort to store the length
onstantly at he fore, but I'm willing to be edumacated on that abstruse
oint. (Or pointer) Will
-----Original Message-----
om: Wols Lists <>
: u2-users <>
nt: Fri, Jul 13, 2012 3:53 am
bject: Re: [U2] trimming a list (a test of your ability)
n 12/07/12 16:15, Dave Laansma wrote:
'm puzzled by '... doesn't care ...' terminology. Of course it 'cares'
bout pointers, it still has to get to the end of the 'string' one way
r nother.
cept that a string, as far as I am aware, uses the "pascal method" I
ink it's alled - namely a string is stored as its length followed by he
tring (or a ollerith string as I used to do in FORTRAN).
So, the question then is, does concatenation := establish and append to
 string' faster than <-1>?
ry much so
And if so, why doesn't the database use the same logic for <-1> as it
oes for = since technically they're accomplishing the same thing?
cause it's doing it in a completely different way. The <-1> logic just
appens o work" whereas the append logic was designed to work hat way.
 you use a field number, the code searches for that field - I think it
kes he field as a counter, and searches the string decrementing the
unter every ime it hits a field mark. When the counter hits zero it's
und what it's ooking for.
 course, if you start at -1, it never hits zero and ends up at the end
 the tring. But this is by accident not design. To do what you uggest
ould require pecial case code which doesn't - logically - elong there.
avid Laansma
T Manager
ubbard Supply Co.
irect: 810-342-7143
ffice: 810-234-8681
ax: 810-234-6142
Delivering Products, Services and Innovative Solutions"

Users mailing list
-Users mailing list
-Users mailing list
-Users mailing list
2-Users mailing list

2-Users mailing list

U2-Users mailing list

Reply via email to