comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Getting code line numbers?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Getting code line numbers? [message #3597] Fri, 17 February 1995 01:42
sjt is currently offline  sjt
Messages: 72
Registered: November 1993
Member
Frank J.Oynes (frank@lynx) wrote:

: Hi all,

: Is there asystem variable or similar that keeps track
: of the name of the currently executing function/procedure
: and the current line number within?

: It is reported when an error occurs, so it must be available
: somehow.

: I need it for reporting events/errors/status to a log file
: something like

: log_message(module_name, line_number, 'Warning: The tea is getting cold')


: Clues, anyone?

: Regards,
: Frank J. �ynes

: frank@spacetec.no

HELP, /TRACE ; Sends a traceback to the terminal.
HELP, CALL=VAR ; Puts a reduced tracback in the variable VAR.

So for what you suggest your best bet might be something like:

help, call=calls
log_message(calls(n_elements(calls)-1), Warning: The tea is getting cold')


--
--
+------------------------+---------------------------------- --+---------+
| James Tappin, | School of Physics & Space Research | O__ |
| sjt@star.sr.bham.ac.uk | University of Birmingham | -- \/` |
| Ph: 021-414-6462. Fax: 021-414-3722 | |
+----------------------------------------------------------- --+---------+
Re: Getting code line numbers? [message #3622 is a reply to message #3597] Mon, 13 February 1995 03:47 Go to previous message
knipp is currently offline  knipp
Messages: 68
Registered: January 1993
Member
In article 95Feb10130718@lynx, frank@lynx (Frank J.Oynes) writes:
>
> Hi all,
>
> Is there asystem variable or similar that keeps track
> of the name of the currently executing function/procedure
> and the current line number within?
>
...
>
>
> Clues, anyone?
>
> Regards,
> Frank J. �ynes
>
> frank@spacetec.no


Try: HELP, CALLS=CALLS
FOR i=0L, N_ELEMENTS(CALLS)-1l DO PRINT, CALLS(i)

K. Knipp
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: 3D XY axis location
Next Topic: Re: Turning function return into array & subscripting (Was: Re: rotating 3d array: help for the braindead!)

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 20:03:03 PDT 2025

Total time taken to generate the page: 0.04260 seconds