Claus_Jambrich_5663

Changes in function GET_SCRIPT_VAR

Discussion created by Claus_Jambrich_5663 on Apr 7, 2017
Latest reply on Apr 7, 2017 by Michael_Lowry
In V10 the following script worked:
 
:set &TEST# = "Hallo" :print &&TEST# = &TEST# :set &VAR_TEST# = get_script_var("TEST") :print &&VAR_TEST# = &VAR_TEST#

The result is, as expected:
 
2017-03-24 08:09:15 - U0020408 &TEST# = Hallo 2017-03-24 08:09:15 - U0020408 &VAR_TEST# = Hallo

If you execute the same script in V11 or V12, the following error message is displayed:

U01001350 Variable 'TEST' not found

In V11 and V12, get_script_var does not find the variable when the hashtag at the end is missing (upper example script). In fact this is the correct behavior. The name of the variable is TEST#, not TEST. In V10 GET_SCRIPT_VAR worked though the hashtag is missing. This was a bug as the hashtag is part of the name and should have been required. To make it work in V11 or V12, the hashtag must be added:

:set &TEST# = "Hallo" :print &&TEST# = &TEST# :set &VAR_TEST# = get_script_var("TEST#") :print &&VAR_TEST# = &VAR_TEST#

Outcomes