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

Home » Public Forums » archive » how to determine current position in a program??
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
how to determine current position in a program?? [message #58139] Tue, 22 January 2008 09:46
astroboy2k is currently offline  astroboy2k
Messages: 34
Registered: July 2007
Member
Hello.

I was wondering if anyone would offhand have any idea of how to go
about determining which line number a program is at at a certain time.
That is to say, I would like a program to print a message something
like "at line 1234", where 1234 is the actual line number in the code.

For example, I'd originally have:

pro junk,xxx
print,'1'
print,'2'
print,'you are now at this line in the code ',3
return
end

Of course, I'd want to modify the code endless times to get something
like:


pro junk,xxx
print,'1'
print,'2'
x=0. ;line 3
x=x+1. ;line 4
print,'you are now at this line in the code ',some_function()
return
end

That is to say, I'd like have some_function() return the number 5,
since it's being called at line 5 in the code. I don't want to
constantly have to be changing my print statements, in other words.

When programs crash you get an output to the effect that things came
to a halt at such and such a line in one unit or another, so it seems
like IDL might have the capability of knowing which line of a code is
being executed at any given time.... Does anyone know if this can be
done without too much pain and anguish......

Thanks all,

Mark
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Is there any way to change the dimension of a field in a structure?
Next Topic: Re: how to determine current position in a program??

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

Current Time: Wed Oct 08 17:34:00 PDT 2025

Total time taken to generate the page: 0.00548 seconds