Iterate over array of namespaces
How do you iterate over the array of namespaces returned in the result byref from the call below?
DO ##class(%SYS.Namespace).ListAll(.result)
Running "zw result" displays the namespaces (as individual subscripts in result) in the Terminal but I want to be able to programmatically iterate through each namespace name.
The documentation for ListAll() mentions here that result will be a local array name passed by reference. Is there a way to turn it into a dynamic array?
Product version: IRIS 2022.1
w ##class(%SYS.Namespace).ListAll(.out) is what I would use and just $order over it
https://docs.intersystems.com/irislatest/csp/documatic/%25CSP.Documatic....
Here's some sample code from an open-source project if you'd like to copy:
https://github.com/intersystems/git-source-control/blob/82d740af3ac035fe...
if $d(^|"%SYS"|CONFIG("Namespaces"," ")) for set ns=$o(@$ZR) quit:ns="" write ns,! ; or do whatever you intend
$ORDER works perfectly. Thank you all!