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 <simpson-u...@gerzio.ca> To: U2 Users List <u2-users@listserver.u2ug.org> 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 andling. f you re-edit the source, do you find that it has been split into : 001 PRINT "DOG 02 ":CHAR(255):"CAT" ? ----Original Message----- rom: u2-users-boun...@listserver.u2ug.org mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson ent: Friday, July 13, 2012 1:49 PM o: u2-users@listserver.u2ug.org ubject: Re: [U2] trimming a list (a test of your ability) ell I'll be a horned toad. owever try this ED BP TESTFF 01 PRINT "DOG":CHAR(255):"CAT" ^ p arrow mode R/DOG/DOG^255 01 PRINT "DOG ":CHAR(255):"CAT" FI BASIC BP TESTFF 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 <simpson-u...@gerzio.ca> o: U2 Users List <u2-users@listserver.u2ug.org> 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 x="abc":char(j):"xyz" l=len(x) p=index(x,"x",1) if j=0 or l#7 or p#5 then crt "j=":j crt " x =[":x:"]" crt " len=":l crt " pos=":p end xt d =0 =[abcxyz] en=7 os=5 -----Original Message----- om: u2-users-boun...@listserver.u2ug.org mailto:u2-users-boun...@listserver.u2ug.org] 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: x="abc":char(255):"xyz" crt "[":x:"]" crt len(x) crt index(x,"x",1) d abc xyz] ----Original Message----- om: u2-users-boun...@listserver.u2ug.org mailto:u2-users-boun...@listserver.u2ug.org] Behalf Of Wjhonson nt: Friday, July 13, 2012 12:27 PM : u2-users@listserver.u2ug.org bject: Re: [U2] trimming a list (a test of your ability) es/No 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 omething. 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 <antli...@youngman.org.uk> : u2-users <u2-users@listserver.u2ug.org> 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. Sincerely, avid Laansma T Manager ubbard Supply Co. irect: 810-342-7143 ffice: 810-234-8681 ax: 810-234-6142 ww.hubbardsupply.com Delivering Products, Services and Innovative Solutions" eers, ____________________________________________ Users mailing list us...@listserver.u2ug.org p://listserver.u2ug.org/mailman/listinfo/u2-users ______________________________________________ -Users mailing list -us...@listserver.u2ug.org tp://listserver.u2ug.org/mailman/listinfo/u2-users ______________________________________________ -Users mailing list -us...@listserver.u2ug.org tp://listserver.u2ug.org/mailman/listinfo/u2-users ______________________________________________ -Users mailing list -us...@listserver.u2ug.org tp://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ______________________________________________ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users