Discussion
· Aug 18, 2019

How do You Document Globals You Use in a Project

Hi Developers!

InterSystems IRIS stores everything in globals and if we use ObjectScript classes to persist data class documents globals it uses in storage. But if you use globals for calculations, temporary storages, for special indexes or for some other purposes - how do you document it?

Possible options which come to my mind:

1. Macro

#define Array ^MyGlobal

usage:

s $$$Array(1)=1

2. Class parameter

Parameter Array ="^MyGlobal";

Usage:

s @(..#Array)@(1)=1

3. Documentation comment

Just document it to have it in a class documentation

/// ^MyGlobal is used to store my data

What do you do?

Discussion (3)1
Log in or sign up to continue