It is logical but I did not get it first.

A sample code from a loop:
Code: Select all
...
SetVar "[NewVarArt]" "[Variable[vCounter]]"
SetVar "[[NewVarArt]]" "[VarValue]"
...
Regards
Moderator: Neosoft Support
Code: Select all
...
SetVar "[NewVarArt]" "[Variable[vCounter]]"
SetVar "[[NewVarArt]]" "[VarValue]"
...
What Hans-Peter shows does work for me:Neosoft Support wrote:I think it works doesn't it?
Code: Select all
SetVar "[NewVarArt]" "[Variable[vCounter]]"
SetVar "[[NewVarArt]]" "[VarValue]"
Code: Select all
setvar "[test]" ""
Code: Select all
DefineVar "[test]" "String" "" "Global" ""
We could have gone either way, but as it is setting a variable to a null value "" removes the variable from memory. Without the debugger window you wouldn't even realize this fact, because NeoBook treats non-existent and empty variables exactly the same. The downside to showing empty variables is the need to keep them in memory somewhere. The DefineVar action was introduced in part to provide the ability to declare typed variables in advance. Declared variables stick around even when they are set to a null value. This was an evolution of NeoBook over time that is no doubt confusing to new users since it's not really necessary except in specific situations.I notice in NB that if a variable is set to be empty
setvar "[test]" ""
the variable is considered non-existent and does not appear in the debugger. This can be confusing if you are attempting to determine if a variable has a value or not. I would think it would show in the debugger in the variable section with an identifier that it is empty.