APPX is the Premier Development and Runtime Environment for Business Application Software
(Answer) (Category) FAQ's - APPX Software, Inc. : (Category) APPX Utility : (Category) APPX Development Environment : (Category) Tips & Techniques :
How does LOCAL and RECEIVE statements work?
First: a LOCAL statement is (nearly) equivalent to a RECEIVE statement that executes without a matching PASS statement (the RECEIVE statement will set the next T/F to F, but a LOCAL statement doesn't change the T/F flags).
Second: when you execute a LOCAL (or RECEIVE) statement, the engine has to decide the point in time that the original value should be restored.
If you execute a LOCAL (or RECEIVE) while there is a GOSUB active (in the current event point), the original value is restored when you execute a RETURN statement.
If there is no GOSUB active, the original value is restored when the event point ends (with one exception). That means that you can add LOCAL statements to the beginning of an event point to protect variables that you want to use in that event point. You could instead add a RECEIVE statement, but that would be kind of weird (that may let you PASS a value in one event point and RECEIVE it in the next event point, but I can't recommend doing that).
If you execute a LOCAL statement (and there is no active GOSUB) in the StartOfProcess event point, you are protecting a variable for the life of the process (the original value is restored when the process ends).
[Append to This Answer]
2005-Jan-27 3:46pm
Previous: (Answer) Can Current Release of Appx support LDAP?
Next: (Answer) Can i have environment variable APPX_41_EPS set while designing in 4.2?
This document is: http://board.appx.com/cgi-bin/fom.cgi?file=545
[Search] [Appearance]
This is a Faq-O-Matic 2.719.
Copyright 2003 by APPX Software, Inc. All rights reserved.