#!F-adobe-helvetica-medium-r-normal--18* #!N #!N #!Rgetloc GetLocal #!N #!N Category #!N #!N #!Lcatflow,dxall755 h Flow Control #!EL #!N #!N Function #!N #!N Retrieves an object from the cache. State is not maintained between executions of any macros containing GetLocal. #!N #!N Syntax #!N #!N #!F-adobe-times-bold-r-normal--18* object, link #!EF = GetLocal( #!F-adobe-times-bold-r-normal--18* object, reset #!EF ); #!N #!N Inputs #!T,1,91,276,461,646 #!F-adobe-times-medium-r-normal--14* #!F-adobe-times-bold-r-normal--18* #!N TAB Name TAB Type TAB Default TAB Description #!EF #!N TAB object TAB object TAB none TAB object to be output if nothing has #!N TAB - TAB - TAB - TAB been set #!N TAB reset TAB flag TAB 0 TAB 0: the object cached by SetLocal #!N TAB - TAB - TAB - TAB (if there is one) is passed to #!N TAB - TAB - TAB - TAB output #!N TAB - TAB - TAB - TAB 1: object (not the cached object) #!N TAB - TAB - TAB - TAB is passed to output. #!N TAB - TAB - TAB - TAB #!EF #!N #!N Outputs #!T,1,161,321,646 #!F-adobe-times-medium-r-normal--14* #!F-adobe-times-bold-r-normal--18* #!N TAB Name TAB Type TAB Description #!EF #!N TAB object TAB object TAB retrieved object #!N TAB link TAB string TAB link to corresponding SetLocal module #!N TAB - TAB - TAB #!EF #!N #!N Functional Details #!N #!N GetLocal works with SetLocal to place objects in and retrieve them from the cache. GetLocal differs from GetGlobal in that GetLocal and SetLocal are used when the state maintained by the Get/Set pair should be reset when a macro containing these modules is reexecuted. In contrast, GetGlobal and SetGlobal will maintain state when the macro is reexecuted. Note that for a single execution of a macro (for example, throughout the execution of an entire loop), state is of course maintained by both GetLocal and GetGlobal. #!N #!I0 #!N #!N #!I0 #!N #!F-adobe-times-bold-r-normal--18* #!F-adobe-times-bold-r-normal--18* object #!EF #!EF #!I50 #!N specifies the object to be output by GetLocal if nothing has been placed in the cache (e.g., as on the first execution of a visual program) or if #!F-adobe-times-bold-r-normal--18* reset #!EF = 1. #!N #!I0 #!N #!F-adobe-times-bold-r-normal--18* #!F-adobe-times-bold-r-normal--18* reset #!EF #!EF #!I50 #!N causes the module to output #!F-adobe-times-bold-r-normal--18* object #!EF . If this parameter is set to 0 (zero), GetLocal retrieves the last object placed in the cache by SetLocal (if there is one). Otherwise, the module passes #!F-adobe-times-bold-r-normal--18* object #!EF to the output. #!I0 #!N #!N #!N #!N The #!F-adobe-times-bold-r-normal--18* link #!EF output is to be connected to the #!F-adobe-times-bold-r-normal--18* link #!EF input of the corresponding SetLocal module. GetLocal should always be used with SetLocal, not with SetGlobal. SetLocal must be executed on the same machine as GetLocal (i.e., it cannot be distributed to a different machine). #!N #!N It is not necessary to use the First tool to provide input to the #!F-adobe-times-bold-r-normal--18* reset #!EF parameter of GetLocal inside a macro, since this is done automatically whenever the macro is reexecuted. #!N #!N A detailed description of the behavior and use of the GetLocal, GetGlobal, SetLocal, and SetGlobal modules can be found in #!Lstates,dxall269 h Preserving Explicit State #!EL in IBM Visualization Data Explorer User's Guide. #!N #!N Example Visual Programs #!N #!N #!CForestGreen #!N #!F-adobe-courier-bold-r-normal--18* #!N Accumulate.net #!N Bounce.net #!N SimpleGetSetLoop.net #!EF #!N #!N #!EC #!N #!N See Also #!N #!N #!Lodone,dxall828 h Done #!EL , #!Lofirst,dxall850 h First #!EL , #!Lsetloc,dxall941 h SetLocal #!EL , #!Lgetglo,dxall854 h GetGlobal #!EL , #!Lsetglo,dxall940 h SetGlobal #!EL , #!Lreset,dxall926 h Reset #!EL #!N #!N #!Lxmod,dxall263 h Data Explorer Execution Model #!EL in IBM Visualization Data Explorer User's Guide. #!N #!N #!N #!F-adobe-times-medium-i-normal--18* Next Topic #!EF #!N #!N #!Lglyph,dxall856 h Glyph #!EL #!N #!F-adobe-times-medium-i-normal--18* #!N