Initializing help system before first use

dbggetlocation

dbggetlocation


Purpose
Get a source file location associated to a given line index.
Synopsis
int dbggetlocation(XPRMcontext ctx, int lndx, int *line, const char **fname);
Arguments
ctx 
Mosel's execution context
lndx 
Line index, -1 for current location or -2 for the last location of the model
line 
Pointer to an area where the line number is returned
fname 
Pointer to an area where the file name is returned
Return value
0 if successful, 1 otherwise (invalid parameters)
Further information
1. This funtion returns the source location (file name and line number) corresponding to a given line index. If the provided index is -1 the function returns information related to the statement being executed. If this value is -2, the location of the last statement is returned.
2. If parameter fname is NULL, the function returns in line the current line index ( i.e. the value of lndx or its updated value if it was given as a negative number).
3. If the returned line number is 0, the machine is currently executing a portion of the code for which there is no debugging information ( i.e. a package compiled without option -g or -G). In this case the fname information corresponds to the package name.