Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Returns a structure indicating whether a global reference is defined, whether it has data, and whether it has subscripts.

Arguments

None. The global reference is set when calling *open()* on the object instance created in *lib.cfmumps.global*.

Return Value

Returns a struct with the following boolean members:

  • hasData
  • hasSubscripts
  • defined

Example

 

CFScript
glob = createObject("component", "lib.cfmumps.global");
glob.open("myGlobal", ["key"]);
if(glob.defined().defined) {
  writeOutput("^myGlobal(""key"") is defined"); 
}

if(glob.defined().hasData) {
  writeOutput("^myGlobal(""key"") has data"); 
} 

if(glob.defined().hasSubscripts) {
  writeOutput("^myGlobal(""key"") has subscripts"); 
} 

glob.close(); 

 


 

CFML
<cfset glob = createObject("component", "lib.cfmumps.global")>
<cfset glob.open("myGlobal", ["key"])>
<cfif glob.defined().defined>
^myGlobal("key") is defined<br>
</cfif>
<cfif glob.defined().hasData>
^myGlobal("key") has data<br>
</cfif>
<cfif glob.defined().hasSubscripts>
^myGlobal("key") has subscripts<br>
</cfif>



 

  • No labels