Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Global variable content to string containing its name
#1
Supposed that string "s" contains the name of a global variable (MyTemp). I need to move in string "s" the content of the global variable. I wrote the following function to this end. I wonder whether there exists a simpler approach :

Function tempf09
Code:
Copy      Help
str s="MyTemp"
type RTAF2 str'arg1 str'arg2
RTAF2 r
str code=F"function RTAF2&r[]r.arg1=F''{{{s}}''"
RunTextAsFunction2(code &r)
out r.arg1

Many thanks in advance.
#2
With QM variables - does not exist. You can use environment variables for it.
#3
Thank you very much.
Actually it works. Probably I missed to underline that MyTemp is declared & initiated as global variable in init2. No need to say that it was also checked with environmental variables.
Best regards.


Forum Jump:


Users browsing this thread: 1 Guest(s)