In Universe you can do the following at tcl,

LIST MD 'MD' EVAL "OCONV(DATE()+20,'D4')" FMT "12R" COUNT.SUP COL.HDR.SUPP 
HDR.SUP ID.SUP

LIST MD 'MD' EVAL "3 * 4" FMT "12R" COUNT.SUP COL.HDR.SUPP HDR.SUP ID.SUP

EVAL allows any valid code that you would normal put into an itype dictionary, 
including variable storage to a degree using @1, @2, etc...

LIST MD 'MD' EVAL "2;4;@1 * @2;OCONV(@3 * 1.3,'MD20,')" FMT "12R" COUNT.SUP 
COL.HDR.SUPP HDR.SUP ID.SUP


Regards,
Stewart Mitchell

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of David Jordan
Sent: Friday, 24 August 2012 1:42 PM
To: U2 Users List
Subject: Re: [U2] Variable Interpolation

I wrote one myself.   There is some capability with one of the conv commands 
but it is limited to 255character.

Regards
David Jordan

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Tony Gravagno
Sent: Friday, 24 August 2012 1:56 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Variable Interpolation

> From: jjuser
> Does UniBasic have a way to do variable interpolation (without
writing to
> a file, compiling it as a program, and calling it)?


Do you mean something like this?

VAL = 0
CALL @"SUB FOO(X,Y);Y=X+1;RETURN"( 3, VAL ) CRT VAL ; *  4

That would be Awesome! I don't believe any of the MV platforms do that because 
I've been looking for it for 15 years. It can be simulated in various ways, but 
you did limit the scope of the challenge.

I think you're trying to avoid this?:

CODE = \ CRT DATE()+20\
EXECUTE "PGEN ":CODE CAPTURING OUT
* OUT is 16327
In this case the PGEN program reads from TCL, writes, compiles, runs, and that 
output gets captured. But at least the mechanism for performing that task is 
abstracted from this client/application code.

Cache' allows you to enter code at TCL and then execute it without 
saving/compiling. That can also be simulated in U2. I don't think I've ever 
seen anyone else ask for it here - certainly no one willing to pay for it. ;)

Out of curiosity, what's your application for this? And please correct the 
above if I've misunderstood the question.

T

_______________________________________________
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

Effective October 2011 Symbion Pharmacy Services has changed its name to 
Symbion.  My email address has changed from @symbionpharmacy.com to 
@symbion.com.au.  The company's ABN (25 000 875 034) remains the same.

This email and any attachments are confidential. They may contain legally 
privileged information or copyright material. You should not read, copy, use or 
disclose them without authorisation. If you are not an intended recipient, 
please contact us at once by return email and then delete the original message 
and all copies. We do not accept liability in connection with computer virus, 
data corruption, delay, interruption, unauthorised access or unauthorised 
amendment.
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to