str = List_Create_Global(sListVarName)
This macro function is used to create a new global list named sListVarName.
Note that, by global, it is meant that the list, as any other global variable, will maintain its value, throughout one diary generation, for all tokens of the same macro index. Global variables are not shared between tokens of different macro indices.
As for all global variables, you should always check, at the top of your macros, if your global variables are initialized, as in the macro code below.
global
sGlobalList
var
begin
// make sure the global list has been initialized
if not IsInitialized(sGlobalList)
sGlobalList = List_Create_Global('sGlobalList')
endif
// use the list
//...
end
You should not call List_Destroy for global lists as these are managed by the macro interpreter and are all deleted automatically at the end of diary generation.
See also: list macro functions.
Topic 178975, last updated on 18-Apr-2020