Click or drag to resize

ProcFile Function

X#
Return the name of the activated module.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax
 FUNCTION ProcFile() AS STRING
Request Example View Source

Return Value

Type: String
For the current activation, ProcFile() returns the name of the current module.
For a previous activation, ProcFile() returns the name of the module that invoked the current module.
Remarks
ProcFile() queries the X# activation stack to determine the name of the currently executing module. ProcFile() is used with ProcLine() and ProcName() to report debugging information. Not every function call sets up the activation stack.
A function invokes the activation stack if in it you have used PRIVATE or PUBLIC variables or issued a SET PROCNAME ON command.
Examples
This example presents a function that you can call during the debugging phase of program development to display the names of the current and previously activated modules:
X#
1// In Module1:
2FUNCTION Start()
3    MyFunction()
4// In Module2:
5FUNCTION MyFunction() AS VOID
6    ? ProcFile()            // Module2 (current)
7    ? ProcFile(1)            // Module1 (previous)
See Also