callwithindatabase(
callwithindatabase()

The callwithindatabase( function returns true if the current procedure was called by another procedure in the same database, false if it was called by a procedure in another database.

Parameters

No parameters.

Description

The callwithindatabase( function returns true if the current procedure was called by another procedure in the same database, false if it was called by a procedure in another database.

This example shows how to make a “private” a procedure — a procedure that can be called by other procedures in the same database but not by procedures in other databases.

    if  callwithindatabase() = false()
        rtn
    endif
    ...
    ... rest of procedure
    ...

An alternative would be to replace the [rtn][] statement with a [rtnerror][] statement.

See Also

- call
- call(
- callingdatabase(
- callingprocedure(
- callwithin
- callwithin(
- case
- catch
- debug
- defaultcase
- else
- elseif
- endcase
- endcatch
- endif
- endloop
- execute
- execute(
- executecatcherrors
- executelocal
- farcall
- farcallwithin
- for
- goto
- if
- info("labels")
- loop
- looparray
- loopindex
- loopwhile
- noimplicitassignment
- nop
- onerror
- pause
- repeatloopif
- resume
- return
- returnerror
- shortcall
- stop
- stoploopif
- try
- until
- usecallerslocalvariables
- usemylocalvariables
- while

History

Version | Status | Notes