IDL programming language

IDL, short for interactive data language, is a programming language which is a popular data analysis language among scientists. IDL is often confused, at the acronym level, with another (unrelated) "IDL": the Interface description language.

Contents

Overview

IDL is vectorized, numerical, interactive, Fortran-like, and is commonly used for interactive processing of large amounts of data (including image processing), right from the keyboard.

IDL originated from early VAX/VMS/Fortran, and its syntax still shows its heritage:

x = findgen(100)/10
y = sin(x)/x
plot,x,y

Note that the operation in the second line applies in a vectorized manner to the whole 100-element array created in the first line, analogous to the way general-purpose array programming languages (such as APL or J) would do it.

As most other array programming languages, IDL is very fast doing vector operations (sometimes as fast as a well-coded custom loop in FORTRAN or C) but quite slow if elements need processing one-by-one. Hence part of the art of using IDL (or any other array programming language, for that matter) for numerically heavy computations is to make use of the inbuilt vector operations.

Features

As a computer language, IDL:

  • is dynamically typed
  • has a single namespace
  • was originally single threaded but now has many multi-threaded functions and procedures
  • has all function arguments passed by reference ("IN-OUT")
  • does not require variables to be predeclared
  • provides only COMMON block declarations to share global values among routines
  • provides a basic form of object-oriented programming, somewhat similar to Smalltalk
  • compiles to an interpreted, stack-based intermediate p-code (à la Java VM)
  • provides a simple and efficient index slice syntax to extract data from large arrays
  • provides various integer sizes, as well as single and double precision floating point real and complex numbers
  • provides composite data types such as character strings, homogeneous-type arrays, and simple (non-hierarchical) record structures of mixed data types

Problems

Some of these features, which make IDL very simple to use interactively, also cause difficulties when building large programs. The single namespace is particularly problematic in those cases. IDL also lacks empty arrays, variable-sized dynamic arrays (lists), and nested arrays (that is, arrays of arrays are not permitted). The object-oriented features of the language require that the programmer be responsible for managing memory allocation/deallocation. The vectorization is rather primitive, working only along a single axis at a time.

Many historical irregularities survive from the early heritage of the language. Dynamic typing does not include automatic promotion-on-overflow; one consequence is that (for loops) built in the usual way may fail on the 32,768th iteration. The solution is to define the default type for all integers to 32-bit unsigned (this can be done at startup, or embedded in source code). Array indexing and subroutine entry can both be carried out with exactly the same syntax; this ambiguity, coupled with the single namespace for all variables and subroutines, can cause code to stop working when newly defined subroutines or language extensions conflict with local variable names. IDL programmers can avoid many of these problems by using square brackets for array indexing, thereby avoiding conflicts with function names which use parenetheses.

Examples

The following graphics were created with IDL (source code included):

See also

External link

it:IDL

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools