To use this website fully, you first need to accept the use of cookies. By agreeing to the use of cookies you consent to the use of functional cookies. For more information read this page.

Official ZPE Programming Environment documentationglobal

global (var variable) ⇒ boolean

Promotes a local variable or parameter to a global variable. It keeps a copy of the local version as well as the global, but produces a global copy. If the variable is not defined, that is, the variable cannot be found in the global variables, parameters or local variables for the current function, the function returns false otherwise it returns true.

First available: Version 1.3.7.95

Using global

The global function is used to push a variable to the global status. ZPE uses what is referred to as a global function. This is a function in which all other functions run within.

How ZPE deals with global variables

A simple call stack shows how the global function overarches everything that runs within a script.

When a variable is promoted to global it will move straight to the global function variables, even if defined in a parent first.

YASS
global($myvar)
    
Comments

There are no comments on this page.

New comment
Reply
Provide feedback on this page
Comments are sent via email to me.