Code: Select all
// Script Docu: Test "Perm" problem with Global
"Set 2 Perm Vars"
// -------------------------------------------------------------------------------------------------
Global $names;
// -------------------------------------------------------------------------------------------------
Msg "Before 'Perm': _PV = $_PV";
Perm $_PV;
$_PV = "eins";
Msg "After 'Perm' & 'Set': _PV = $_PV";
When ended: test by Scripting/Permanent Variables
But: if you now start any script (do it in stepping mode) this new Global Variable suddenly is completely lost, as if Unset was executed.
(With Step mode you can show it before the first command is executed.)
If in this script you delete the "Global $names" statement, everything will be OK!
XYplorer Beta Club