The following example illustrates the conversion of the Jacl
upvar command
is flagged #?PROBLEM? in the preliminary converted Jython script. This help
identify areas in the Jython script that may require further processing:
JACL: upvar x
==>
JYTHON: global x #?PROBLEM? (jacl 123) UPVAR_RELATIVE_STACK is always \
converted as #0 global.
You need to verify there are no existing global variables with
the same variable name as specified in the
upvar command.
If there is such a case, the preliminary converted Jython script might not
run as originally intended and you need to manually modify the preliminary
converted Jython script to function as originally intended.
Tip: The
Jacl upvar references to absolute stack frame zero
is syntactically equivalent to global variables in
Jython syntax and should not cause a problem in the Jython runtime:
JACL: upvar #0 x
==>
JYTHON: global x