User Tools

Site Tools


setglobalrule_post_address_to_globalrule_.htm
Navigation:  ABC Library Reference > RuleManager > Rule Class Methods >====== SetGlobalRule (post address to GlobalRule) ====== Previous pageReturn to chapter overviewNext page

SetGlobalRule

blk2blue.jpg

SetGlobalRule Posts address of current Rule object to SELF.GlobalRule.

The SetGlobalRule method tests the GlobalRule reference property for NULL. If the reference is not NULL, the address of the current instance of Rule (ADDRESS(SELF)) is posted to the referenced variable.

Example:

Rule.RuleIsBroken PROCEDURE(Byte DisplayIndicator)

RetVal              LONG

EvaluateResults byte

   CODE

   SELF.SetGlobalRule

   EvaluateResults = EVALUATE(SELF.Expression)

   IF INLIST(ERRORCODE(),800,810,1011)

      RetVal = ERRORCODE()

      STOP('Evaluate Syntax error')

   ELSE

      RetVal = CHOOSE(EvaluateResults = 0,1,0)

      SELF.SetIsBroken(RetVal)        

      IF DisplayIndicator

         SELF.SetIndicator(RetVal)

      END

   END

   SELF.ResetGlobalRule

   RETURN(RetVal)

See Also: ResetGlobalRule, RuleIsBroken

setglobalrule_post_address_to_globalrule_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1