source: trunk/Documentation/idldoc/sourceroot.pro @ 60

Last change on this file since 60 was 60, checked in by pinsard, 18 years ago

upgrade of Documentation/idldoc according to cerbere.lodyc.jussieu.fr: /usr/home/smasson/SAXO_RD/

  • Property svn:executable set to *
File size: 682 bytes
Line 
1; From Jim Pendelton, Oct. 2001
2Function SourceRoot
3Help, Calls = Calls
4UpperRoutine = (StrTok(Calls[1], ' ', /Extract))[0]
5Skip = 0
6Catch, ErrorNumber
7If (ErrorNumber ne 0) then Begin
8    Catch, /Cancel
9    ThisRoutine = Routine_Info(UpperRoutine, /Functions, /Source)
10    Skip = 1
11EndIf
12If (Skip eq 0) then Begin
13    ThisRoutine = Routine_Info(UpperRoutine, /Source)
14EndIf
15Case StrUpCase(!version.os_family) of
16    'WINDOWS' : DirSep = '\'
17    'UNIX' : DirSep = '/'
18    'MACOS' : DirSep = ':'
19    'VMS' : DirSep = ']'
20    Else : DirSep = ''
21EndCase
22Root = StrMid(ThisRoutine.Path, 0, StrPos(ThisRoutine.Path, DirSep, /Reverse_Search) + 1)
23Return, Root
24End
Note: See TracBrowser for help on using the repository browser.