[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Sand 1, D-72076 Tübingen, Germany
[Uni logo]


FDECOMP Source code in fdecomp.pro

FDECOMP

Name
     FDECOMP
Purpose
     Routine to decompose file name(s) for any operating system. V5.3 or later
Calling Sequence
     FDECOMP, filename, disk, dir, name, qual, version, [OSFamily = ]
Input Parameters
     filename - string file name(s), scalar or vector
Output Parameters
     All the output parameters will have the same number of elements as
       input filename
       disk - disk name, always '' on a Unix machine, scalar or vector string
       dir - directory name, scalar or vector string
       name - file name, scalar or vector string
       qual - qualifier, set equal to the characters beyond the last "."
       version - version number, always '' on a non-VMS machine, scalar string
Keyword Parameters
     OSFamily - one of the four scalar strings specifying the operating
             system:  'vms','Windows','MacOS' or 'unix'.    If not supplied,
             then !VERSION.OS_FAMILY is used to determine the OS.
Example
     Consider the following file names
     unix:    file = '/rsi/idl40/avg.pro'
     vms:     file = '$1$dua5:[rsi.idl40]avg.pro;3
     MacOS:   file = 'Macintosh HD:Programs:avg.pro'
     Windows: file =  'd:\rsi\idl40\avg.pro'
     then IDL> FDECOMP,  file, disk, dir, name, qual, version
       will return the following
                 Disk             Dir          Name        Qual     Version
       Unix:      ''            '/rsi/idl40/'  'avg'       'pro'       ''
       VMS:     '$1$dua5'       '[RSI.IDL40]'  'avg'       'pro'       '3'
       Mac:     'Macintosh HD'  ':Programs:'   'avg'       'pro'       ''
       Windows:    'd:'         \rsi\idl40\    'avg'       'pro'       ''
Note
     (1) All tokens are removed between
           1) name and qual  (i.e period is removed)
           2) qual and ver   (i.e. VMS semicolon is removed)
     (2) On VMS the filenames "MOTD" and "MOTD." are distinguished by the
         fact that qual = '' for the former and qual = ' ' for the latter.
Procedures Used
     None.
Revision History
     version 1  D. Lindler  Oct 1986
     Include VMS DECNET machine name in disk    W. Landsman  HSTX  Feb. 94
     Converted to Mac IDL, I. Freedman HSTX March 1994
     Converted to IDL V5.0   W. Landsman   September 1997
     Major rewrite to accept vector filenames V5.3   W. Landsman June 2000
     Fix cases where disk name not always present  W. Landsman  Sep. 2000
     Make sure version defined for Windows  W. Landsman April 2004

Last modified by pro2html on 2004 April 27 at 03:57 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically