callingprocedure()

The callingprocedure( function returns the name of the procedure that called this procedure as a subroutine, if any.


Parameters

No parameters.


Description

If a procedure was called as a subroutine by another procedure, this function will return the name of the calling procedure.

This example shows how a procedure can be set up to work as a standalone procedure or as a subroutine. If the procedure is called as a subroutine it gets the start value from the calling procedure, but if it is used standalone it will prompt the user to enter the start value.

local  start
if  callingprocedure() <> ""
    start= parameter( 1)
else
    start=""
    gettext  "Start: ",start
endif
...
... rest of subroutine
...

In this example it doesn’t matter what the name of the calling procedure is, but that information is available if necessary.


See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0