Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


  >  Docs Center  >  Libraries  >  ASTROLIB  >  GETPRO

GETPRO

GETPRO

Name


    GETPRO

Purpose


    Search !PATH for a procedure, and copy into user's working directory

Explanation


    Extract a procedure from an IDL Library or directory given in the
    !PATH system variable and place it in the current default directory
    (presumably to be edited by the user).

Calling Sequence


    GETPRO, [ proc_name ] ;Find PROC_NAME in !PATH and copy

Optional Input


    proc_name - Character string giving the name of the IDL procedure or
              function. Do not give an extension. If omitted,
              the program will prompt for PROC_NAME.

Outputs


    None.

Side Effects


      A file with the extension .pro and a name given by PROC_NAME will
      be created on the user's directory.

Procedure


      The FILE_WHICH() function is used to locate the procedure in the IDL
      !PATH. When found, FILE_COPY is used to
      copy the procedure into the user's current default directory. If not
      found in !PATH, then the ROUTINE_INFO() function is used to determine
      if it is an intrinsic IDL procedure.

Example


      Put a copy of the USER library procedure CURVEFIT on the current
      directory
      IDL> getpro, 'CURVEFIT'

Restrictions


      User will be unable to obain source code for a native IDL function
      or procedure, or for a FORTRAN or C routine added with CALL_EXTERNAL.
      User must have write privilege to the current directory

Procedure Calls


      ZPARCHECK

Revision History


      Written W. Landsman, STX Corp. June 1990
      Now use intrinsic EXPAND_PATH() command W. Landsman November 1994
      Use ROUTINE_NAMES() to check for intrinsic procs W. Landsman July 95
      Update for Windows/IDL W. Landsman September 95
      Check if procedure is in current directory W. Landsman June 1997
      Use ROUTINE_INFO instead of undocumented ROUTINE_NAMES W.L. October 1998
      Use FILE_WHICH() to locate procedure W. Landsman May 2006
      Assume since V5.5, remove VMS support W. Landsman Sep 2006
      Assume since V6.0, use file_basename() W.Landsman Feb 2009
      Test for .sav file, more robust test for write privilege W.L. Jul 2010



© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us