The LAMP Application

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

legacy/IDLv4tov5/

idlv4_to_v5.pro


top idlv4_to_v5

idlv4_to_v5, infiles, outdir

NAME: IDLV4_TO_V5 PURPOSE: Modify an IDL V4.0 (or earlier) procedure such that variables are indexed using square brackets, as allowed (and suggested) within IDL V5.0 and later CALLING SEQUENCE: IDLV4_TO_V5, infiles, outdir INPUTS: infiles - scalar string specifying IDL procedure name(s), wild card values allowed outdir - scalar string giving directory to contain output file. EXAMPLES: Convert the procedure curvefit.pro in the current directory to a IDL V5 version in the (Unix) idlv5 directory IDL> idlv4_to_v5,'curvefit.pro','idlv5/' Convert all the procedures in the current directory to IDL V5 versions in the /share/idlv5 directory IDL> idlv4_to_v5, '*.pro', '/share/idlv5/' METHOD: ISFUNCTION() is used to determine all the routine names in the file, and then ROUTINE_INFO() is used to determine the names of all variables in the procedure. Each (non-commented) line is scanned for parentheses, and converted to square brackets if the token to the left of the left parenthesis matches a variable name. NOTES: (1) Only runs under IDL V5.0 (since it calls ROUTINE_INFO()) (2) May possibly get confused by parenthesis within strings. (3) May get confused by IDL statements that extend over multiple lines idlv4_to_v5 will supply a warning when it becomes confused by unmatched parenthesis. (4) Do not include this procedure 'idlv4_to_v5' in the directory that you are trying to convert (since it will compile the procedure while executing it, and do a retall.) (5) Conversions cannot be performed unless specified procedure(s) already compile properly (6) Will not work on IDL main programs (7) May get confused by gaps between array name and parenthesis PROCEDURES CALLED: FDECOMP, MATCH, REMOVE, ISFUNCTION() REVISION HISTORY: Written W. Landsman Hughes STX June 1997 Variable names can have numerals August 1997 Never change an intrinsic IDL function to square brackets, even if it is also a variable name.

Parameters

infiles
outdir

File attributes

Modification date: Tue Oct 1 14:16:37 2013
Lines: 221