Set Variable to value of another variable

Got a problem you cannot solve? Try here.
Post Reply
JerzyK
Posts: 4
Joined: Thu Jul 29, 2021 5:20 am

Set Variable to value of another variable

Post by JerzyK »

Hi,

I would like to save a variable value in another variable.

What script I work on does:

Code: Select all

     Set Variable TMP to 
     MyPlugin (get result into variable TMP) // TMP = 25 after that
     Set Variable INSTALLED_VERSION to $TMP$ // INSTALLED_VERSION = TM" instead 25 
I know variable TMP is a horrible name, but this is what I got to work with, so bear with me :)
Either way I am confused if It is even possible to assign this way. Documentation doesn't say it would be illegal, but it is not working while compiling...

So can I achieve this somehow?
JerzyK
Posts: 4
Joined: Thu Jul 29, 2021 5:20 am

Re: Set Variable to value of another variable

Post by JerzyK »

To make it look weirder, when I do such assignement at the begging of the script it works just fine.

I even got this:

Code: Select all

     Set Variable TMP to TEST
     Set Variable ZAINSTALOWANA_WERSJA_FIREBIRD to 
     Set Variable ZAINSTALOWANA_WERSJA_FIREBIRD to $TMP$ // ZAINSTALOWANA_WERSJA_FIREBIRD = TEST after this executes
     Set Variable TMP to 
     Set Variable ZAINSTALOWANA_WERSJA_FIREBIRD to 
     repeat
       Firebird wersja (get result into variable TMP) // TMP = 25 after this executes
       Set Variable ZAINSTALOWANA_WERSJA_FIREBIRD to $TMP$ // ZAINSTALOWANA_WERSJA_FIREBIRD = TMP after this executes
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Set Variable to value of another variable

Post by FrancescoT »

You should to share a very minimal project that replicates the issue.
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply