# Re: [U2] Variable Interpolation

```http://www.thefreedictionary.com/interpolation
in·ter·po·late (n-tûrp-lt)
v. in·ter·po·lat·ed, in·ter·po·lat·ing, in·ter·po·lates
v.tr.
1. To insert or introduce between other elements or parts.
2.
a. To insert (material) into a text.
b. To insert into a conversation. See Synonyms at introduce.
3. To change or falsify (a text) by introducing new or incorrect material.
4. Mathematics To estimate a value of (a function or series) between two known
values.
v.intr.
To make insertions or additions.```
```
--------------------------------------------------------------------------------

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

Sorry but I always thought iterpolation means describing a mathematical
function like  Y=2X for instance  by producing a graph from it or
describing key parameters in a system of coordinates (x,y) like where it
crosses the y- or x-axis, if it rises or falls and in which degree etc. .

On 24/08/2012 04:56, Tony Gravagno wrote:
>> 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

_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
```