ProcFile Function (DWord) | |
Return the name of the activated module.
Namespace:
XSharp.Core
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.21
Syntax FUNCTION ProcFile(
wActivation AS DWORD
) AS STRING
public static string ProcFile(
uint wActivation
)
Request Example
View SourceParameters
- wActivation
- Type: DWord
Specifies which activation to query.
A value of 0 refers to the current activation, a value of 1 refers to the previous activation, and so on.
The default value is 0.
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:
1
2FUNCTION Start()
3 MyFunction()
4
5FUNCTION MyFunction() AS VOID
6 ? ProcFile()
7 ? ProcFile(1)
See Also