Previous Using IDL: Importing and Writing Data into Variables Next

Reading ASCII Data

IDL recognizes two types of ASCII data files: free format files, and explicit format files. A free format file uses commas or tabs and spaces to distinguish each element in the file. An explicit format file distinguishes elements according to the commands specified in a format statement. Most ASCII files are free format files.


Note
If you prefer not to use an interactive dialog (described below), you can also use the READ/READF, or READS procedures to access ASCII data. The READ procedure reads free format data from standard input, READF reads free format data from a file, and READS reads free format data from a string variable.

Launching the ASCII Template Dialog

The ASCII_TEMPLATE function launches a dialog that you can use to configure the structure of data in an ASCII file. Access this feature in one of the following ways:


Note
If you specify a Filename argument to ASCII_TEMPLATE, the dialog allowing you to browse to select a file will not appear. See ASCII_TEMPLATE if you want specify a file and other parameters programmatically.

See Using the ASCII Template Dialog under ASCII_TEMPLATE for instructions on how to use the dialog to define the structure of your ASCII data.

  IDL Online Help (March 06, 2007)