PROIV Developer Global Logic provides a general subroutine capability for use with Local Logic processing. 

A Global Logic can be accessed by any function.  A Global Logic is identified by a name comprising up to eight characters.  A Global Logic routine can be called from a Local Logic routine or from another Global Logic routine.  A Global Logic routine can be recursive (i.e. it can call itself).

A Global Logic may be defined and used as a Special Check.

These Global Logic routines are for PROIV internal use only: FNCALL, FNRET, FNLINK, FNSTAT, FNPARM. 

Types

There are four types of Global Logic routine:

A (Alpha) - Returns an alpha value; can be used in any alpha expression in place of an alpha variable.

N (Numeric) - Returns a numeric value; can be used in any numeric expression in place of a numeric variable.

P (Procedure) - Does not return a value and must be called separately from any expression.

W (Wide) - Returns a wide value; can be used in any wide expression in place of a wide variable. 

Structure

The last executed statement of a Global Logic of type A or N must be the RETURN statement.  The statement must include the value to be returned and the type of that value must match the type of the Global Logic function.  

Formal Parameters

Formal parameters to the Global Logic are declared with the PARMS statement, with scratch variable positions representing the parameters declared.  The PARMS statement is not required if the Global Logic has no parameters but, if used, it must be the first statement in the Global Logic. 

Scratch Variables

Scratch variables are specific to the Global Logic in which they are defined.  This prevents any possible data collisions of scratch variables between functions and Global Logics. 

To share one or more scratch variables between a function and a Global Logic, use the EXTERN logic statement. 

Restrictions

Strings are truncated to 250 when concatenated in Global Logic calls.

Comment on this topic

Topic ID: 520013

 
 
 

Table of Contents

Index

Glossary

-Search-

Back