source: trunk/SRC/Utilities/xfile.pro @ 242

Last change on this file since 242 was 242, checked in by pinsard, 17 years ago

improvements/corrections of some *.pro headers + replace some message by some report

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.1 KB
RevLine 
[2]1;+
2;
[223]3; @file_comments
[242]4; display an ASCII file in a widget.
[239]5; It is the same thing that <proidl>xdisplayfile<proidl> but here, we use it
6; to display the content of a procedure or of a function located in the !path
7; ".pro" suffix will be appended if needed.
[2]8;
[223]9; @categories
[157]10; Utilities
[2]11;
[223]12; @param FILENAME {in}{required}
13; It is the name of the procedure or of the function
[136]14; we want to display (with or without .pro at the end).
[2]15;
[223]16; @keyword _EXTRA
[239]17; Used to pass keywords to <proidl>xdisplayfile</proidl>
[2]18;
[223]19; @examples
20; IDL> xfile,'plt'
[2]21;
[223]22; @history
23; Sebastien Masson (smasson\@lodyc.jussieu.fr)
24; 7/1/99
25; 6/7/1999: compatibility mac and windows
[133]26;
[223]27; @version
28; $Id$
[133]29;
[2]30;-
[231]31;
[232]32PRO xfile, filename, _EXTRA = ex
[114]33;
34  compile_opt idl2, strictarrsubs
35;
[239]36; Are we sure filename is a string?
37   intype = size(filename, /type)
38   if intype NE 7 then begin
39      dummy = report('Input parameter must be a string and not a '+size(filename, /tname))
40      return
41   endif
42; find the file and display it!
43   pfile = find(filename, /first_found)
44   IF pfile NE 'NOT_FOUND' THEN xdisplayfile, pfile[0], _extra = ex $
45   ELSE dummy = report(filename + ' does not exist ...')
46
[2]47   return
48end
Note: See TracBrowser for help on using the repository browser.