Trail: PROIV Documentation > Developer > PROIV Developer > Developing Functions > Events and Logic > EXTERN

 

 

Purpose

EXTERN in a Global Logic specifies that one or more scratch variables are to be shared between the Global Logic and the functions in which it is used.
 

Syntax

EXTERN (var1{,var2,…varn})
 

Operation

var1 to varn are the scratch variables to be shared.
 

Remarks

EXTERN is for use in Global Logic only. It is recommended that EXTERN statements are placed at the beginning of the Global Logic.

A scratch variable defined in a Global Logic without an EXTERN statement is considered specific to that logic. Any attempt to reference it elsewhere in the function will result in PROIV generating another like named, but completely separate variable.

EXTERN can also be used where the value of a variable used within Global Logic is to be maintained between calls to the logic (otherwise it is reset on each entry).
 

Example

This example shows a Local Logic that calls a Global Logic to calculate a current balance.

#CURBAL = CURBAL()
 

Comment on this topic

Topic ID: 520056