See Also: Global Variables, DataFlex built-in Global Variables
Use the Global_Variable command to ensure a variable declaration is unambiguously defined as being global when so intended.
Global_Variable {data-type} {variable-name} [{maximum-length}]
Global_Variable {data-type} {variable-name}
where
{data-type} is the name of the global variable that is being declared
{variable-name} is the name of the global variable that is being declared
{maximum-length} is the maximum number of characters that the global string can contain; between 1 and 4096. If {maximum-length} is omitted, the global String variable's length will be 80 characters.
Variables declared outside procedures and functions are implicitly global, but using the global_variable command reduces ambiguity and declares the intent for a variable to be global; it reduces any chance of code misinterpretation.
You can also use the global_variable command to declare global variables inside functions and procedures, but this technique is strongly discouraged, as it creates code that is difficult to follow.
global_variable String gsCompanyName
This example defines a global String variable named gsCompanyName (with an implied maximum length of 80 characters).