My goodness, what did I start with this question?! I apologize for asking and then going on vacation; I didn't expect all of the responses. I'll make sure not to ask and run again ;)
Charles nailed the purpose behind the question, but several other folk nailed the rough idea of the functionality I for which I was looking. I guess UniBasic itself doesn't have the functionality without involving command line calls of some sort. Thanks for all of the responses! No -- English is my native language. I can't imagine what was in my question that would have made you think otherwise... http://en.wikipedia.org/wiki/Variable_interpolation On Mon, Aug 27, 2012 at 12:45 PM, John Thompson <jthompson...@gmail.com> wrote: > I'm interpolating that the original poster may have not had a chance to > respond back at this point... Sorry, I couldn't resist :) > > I would imagine that the original poster comes from another language like > some previous folks have said. > > On Mon, Aug 27, 2012 at 12:15 PM, David L. Wasylenko <d...@pickpro.com>wrote: > >> Or... >> 0001 VERB="TRY" ;* Or whatever you called this program >> 0002 SENT=@SENTENCE >> 0003 PTR=INDEX(SENT,VERB,1) ; LLEN=LEN(SENT)-PTR-LEN(VERB) >> 0004 SENT=SENT[PTR+LEN(VERB)+1,LLEN] >> 0005 * >> 0006 F.FILE=FIELD(SENT," ",1) ; LLEN =LLEN-LEN(F.FILE)-1 >> 0007 SENT=SENT[LEN(F.FILE)+2, LLEN] >> 0008 * you now have a clean sentence... >> 0009 CRT DQUOTE(F.FILE) >> 0010 CRT DQUOTE(SENT) >> 0011 * >> 0012 END >> ... david ... >> >> David L. Wasylenko >> President, Pick Professionals, Inc >> w) 314 558 1482 >> d...@pickpro.com >> >> >> -----Original Message----- >> From: u2-users-boun...@listserver.u2ug.org [mailto: >> u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson >> Sent: Friday, August 24, 2012 5:55 PM >> To: u2-users@listserver.u2ug.org; donr_w...@yahoo.com >> Subject: Re: [U2] Variable Interpolation >> >> >> Oops there's a bug. >> Right after the line that starts OFFSET += 1 should be yet another OFFSET >> += 1 so the corrected version should read >> >> IF VERB = 'RUN' OR VERB = 'RAID' THEN >> OFFSET += 1 ; N.FILE = FIELD(SENT,' ',OFFSET) >> OFFSET += 1 >> END ELSE OFFSET += 2 ; N.FILE = 'BP' >> >> >> -----Original Message----- >> From: Wjhonson <wjhon...@aol.com> >> To: donr_work <donr_w...@yahoo.com>; u2-users < >> u2-users@listserver.u2ug.org> >> Sent: Fri, Aug 24, 2012 3:40 pm >> Subject: Re: [U2] Variable Interpolation >> >> >> >> FFT.BP 'TRY' BASIC 27 lines Level: 9 >> * >> * Run any BASIC code typed at TCL >> * Writen Aug 2012 by Will Johnson based on a comment by Don Robinson >> * Released under CC-BY-2.0 license >> * >> SENT = @SENTENCE >> OFFSET = 1 ; VERB = FIELD(SENT,' ',OFFSET) >> IF VERB = 'RUN' OR VERB = 'RAID' THEN >> OFFSET += 1 ; N.FILE = FIELD(SENT,' ',OFFSET) >> END ELSE OFFSET += 2 ; N.FILE = 'BP' >> OPEN N.FILE TO F.FILE ELSE >> DISPLAY 'Cannot open file "':N.FILE:'"' >> END >> OFFSET += 1 ; WHAT = FIELD(SENT,' ',OFFSET) ; C.WHAT = COL2()+1 >> L.SENT = LEN(SENT) ; WHAT = SENT[C.WHAT,L.SENT] >> WRITE WHAT:@AM:"END" ON F.FILE,'TRYCODE' >> EXECUTE 'BASIC ':N.FILE:' TRYCODE' >> EXECUTE 'RUN ':N.FILE:' TRYCODE' >> * >> END >> >> >> >> -----Original Message----- >> From: Don Robinson <donr_w...@yahoo.com> >> To: U2 Users List <u2-users@listserver.u2ug.org> >> Sent: Fri, Aug 24, 2012 12:20 pm >> Subject: Re: [U2] Variable Interpolation >> >> >> Guys, >> >> I may be way off base but I have a program that takes basic code from the >> command line, compiles and runs it. >> >> For example: >> >01 RUNBASIC CRT SYSTEM(2) ; CRT SYSTEM(3) >> ==================================================== >> 79 >> 24 >> > >> >> RUNBASIC is the program and CRT SYSTEM(2) ; CRT SYSTEM(3) is the code in >> this example. 79 and 24 are the answers. >> >> The string of = signs are just for looks. >> >> This could be EXECUTEd from within a program but why? >> It is quite handy for testing bits of code at TCL and might be useful in a >> proc. >> >> RUNBASIC will do anything you can do with one line of code using ; to >> separate statements including FOR ... NEXT and LOOP ... REPEAT. >> >> Code is free as long as you don't critisize it. >> >> Don Robinson >> >> From: Wjhonson <wjhon...@aol.com> >> To: u2-users@listserver.u2ug.org >> Sent: Friday, August 24, 2012 1:38 PM >> Subject: Re: [U2] Variable Interpolation >> >> >> The impression I get from this thread is something like >> >> Oh I've just read on the HELP pages that System(2) tells me the width of >> my CRT >> screen. >> Let me ask my process what it has as the value for System(2). >> Oops I have to write a program just to tell me that.... that's too much >> trouble. >> Why can't it just have a way to *tell* me ? >> >> >> Why!!!! >> >> >> >> >> -----Original Message----- >> From: Martin Phillips <martinphill...@ladybridge.com> >> To: 'U2 Users List' <u2-users@listserver.u2ug.org> >> Sent: Fri, Aug 24, 2012 10:11 am >> Subject: Re: [U2] Variable Interpolation >> >> >> Hi, >> >> I am intrigued by this thread, mostly because I have not understood why I >> would >> want it. >> >> If I can write >> CALL @"SUB FOO(X,Y);Y=X+1;RETURN"( 3, VAL ) >> as suggested, why don't I just write the code inline in my program. What >> have I >> missed? >> >> >> Martin Phillips >> Ladybridge Systems Ltd >> 17b Coldstream Lane, Hardingstone, Northampton NN4 6DB, England >> +44 (0)1604-709200 >> >> _______________________________________________ >> U2-Users mailing list >> U2-Users@listserver.u2ug.org >> http://listserver.u2ug.org/mailman/listinfo/u2-users >> >> >> _______________________________________________ >> U2-Users mailing list >> U2-Users@listserver.u2ug.org >> http://listserver.u2ug.org/mailman/listinfo/u2-users >> _______________________________________________ >> U2-Users mailing list >> U2-Users@listserver.u2ug.org >> http://listserver.u2ug.org/mailman/listinfo/u2-users >> >> >> _______________________________________________ >> U2-Users mailing list >> U2-Users@listserver.u2ug.org >> http://listserver.u2ug.org/mailman/listinfo/u2-users >> >> >> _______________________________________________ >> U2-Users mailing list >> U2-Users@listserver.u2ug.org >> http://listserver.u2ug.org/mailman/listinfo/u2-users >> _______________________________________________ >> U2-Users mailing list >> U2-Users@listserver.u2ug.org >> http://listserver.u2ug.org/mailman/listinfo/u2-users >> > > > > -- > John Thompson > _______________________________________________ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users