Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Procedure Problem

Status
Not open for further replies.

asm338s

Programmer
Jul 16, 2001
135
US
Is there anyway you can find out from where in the program a particular procedure is called?

I call a procedure from my .exe when the program is started and then call it again when the program is closed by clicking a button on the toolbar.

I want the procedure to behave differently depending on where it is called from? Any ideas?
 
Try calling the procedure with a parameter. For example:
Code:
DO myProc WITH "START"
&& Other code goes here
DO myProc WITH "END"

PROCEDURE myProc
LPARAMETERS cCameFrom
IF cCameFrom="START"
    && Program just started
ELSE
    && Program is closing
ENDIF

 
Take a look at SYS(16, ...) also. It may help.

Dave S.
 
Thanks. I am kind of embarassed that I didn't think of this approach earlier.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top