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

Home » Public Forums » archive » Re: Function to return the current procedure/function
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Function to return the current procedure/function [message #67905] Mon, 07 September 2009 01:02 Go to previous message
Maarten[1] is currently offline  Maarten[1]
Messages: 176
Registered: November 2005
Senior Member
On Sep 5, 6:16 pm, maurya <ramaury...@gmail.com> wrote:

> Function Routine_Name
> Info=scope_traceback(/structure)
> n=n_elements(Info)
> FullName=Info[n-2].FileName
>
> SP=Strpos(FullName,'\', /Reverse_Search)
>
> Proc=Strmid(FullName,SP+1,Strlen(FullName)-SP)
> Return,Proc
> End

Just a warning that will prevent a serious headache later on: instead
of hard-coding the path delimiter to '\', you may want to use the
function path_sep() instead. After all, there is only one operating
system that uses '\' as a directory separator.

You may also have a look at the functions file_basename() and
file_dirname().

Best,

Maarten
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Readu, Writeu Causing Segmentation Fault
Next Topic: Re: Help, no improvement in FFT speed on a multiprocessor system

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

Current Time: Wed Oct 08 19:29:07 PDT 2025

Total time taken to generate the page: 0.00390 seconds