One of possible ways is to use a versioning system like sccs
(or RCS). These systems usually have macros for line numbers
and file names (like %C% and %M% in SCCS), and when you will
get the module you will get the right module name and line number
right in the place.
Another way is to write a program to filter out the module code
and to replace one of your own 'macros' with the line number and
module name. The language for this program is up to you (awk, c ...)
Best Regards,
Octav
On Tue, Mar 16, 1999 at 09:41:46AM -0500, Ramdas Gopinath wrote:
> Hi,
> Normally, when a 4GL program errors out, it gives an error with the 4gl name
> followed by the line number e.g.,
>
> Program stopped at "main.4gl", line number 74
>
> However, is there any intenal function to get the 4gl name and line number
> anywhere in a 4gl program. Basically, I have a logging function that could
> be called from several different programs, but one of the parameter's which
> I would like to pass is the module name and line number, so that we know
> from where the log was written. I do not want to hard code the module name
> and line number, because it would become a real maintenance nightmare.
>
> Thanks,
> Gopi.
>
>
--
Octav Chiriac Phone: (373) 2 21 20 96
NetInfo S.R.L. Fax: (373) 2 21 36 59
Chisinau (373) 2 24 00 83
Moldova, Republic of mailto:com@netinfo-moldova.com