That's why I like to develop with IRIS docker containers - every time you have clean IRIS with no garbage code, cache, temp globals, whatever... - you have only what you setup in a build dockerfile script.

Global name is in the var already. Here is the code I needed it for:

ClassMethod InvertList(from, to) As %Status

{



set iter=$o(@from@(""))

while iter'="" {

 set value=@from@(iter)

 set @to@(value)=iter

 set iter=$O(@from@(iter))

 }

}

Says 

#1038: Private variable not allowed : 'gniter=$na(from)' : Offset:21 [zInvertList+1^Example.Globals.1]

for

ClassMethod InvertList(from, to) As %Status

{

#define ForAll(%in,%gn) s gn%in=$na(%gn) s %in="" f { s %in=$o(@gn%in@(%in)) q:%in=""

#define EndFor }



$$$ForAll(iter,from)

set value=@from@(iter)

set @to@(value)=iter

$$$EndFor

}

Maks, thanks for that project!

Do you want to add a sort of "For Each" for a global?

Suppose a have a global ^A(index)=value

And I need to go through all the indexes to do something with the value. 

Currently, I do the following in Objectscript to perform this:

s iter=$Order(^A(""))

while iter'="" {

set value=^A(iter)

/// do something with value

set iter=$O(^A(iter))

}

Would be great to change this to something like that:

zforeach(iter,^A) {

set value=^A(iter)

/// do something with value

}

Updated the ObjectScript code blocks in your post a bit. 

And don't see any DeepSee cubes here - is this DeepSee related?

Would be great - it’s even more presence and developers can collaborate