GNU Data Language

GNU Data Language (GDL) is a free software project hosted at Source Forge (GDL - GNU Data Language).

A free IDL (Interactive Data Language) compatible incremental compiler (i. e. runs IDL programs). IDL is a registered trademark of ITT Visual Information Solutions.


Full syntax compatibility with IDL up to version 7.1 (for 8.0 and later see below).

ALL IDL language elements up to IDL version 7.1 are supported, including:

  • objects, pointers, structs and arrays,
  • system, common block and assoc variables,
  • all operators and datatypes,
  • _EXTRA, _STRICT_EXTRA and _REF_EXTRA keywords...

Supported IDL 8.0 language elements:

  • FOREACH loop
  • negative array indices
  • garbage collection pointers and objects
  • call methods on an object using "." (e. g. object.aMemberProcedure,arg1)

The file input output system is fully implemented (Exception: For formatted I/O the C() sub-codes are not supported yet)

netCDF files are fully supported.

HDF files are partially supported.

Basic support for HDF5 files.

Overall more than 400 library routines are implemented.

SAVE and RESTORE are supported through Craig Markwardt's CMSVLIB library.

Graphical output is partially implemented. The PLOT, OPLOT, CONTOUR, PLOTS, XYOUTS, SURFACE, TVRD and TV commands (along with WINDOW, WDELETE, SET_PLOT, WSET, TVLCT, CURSOR) work (important keywords, some !P system variable tags and multi-plots are supported) for X windows, z-buffer and postscript output.

GDL has an interface to python (python routines can be called from GDL).

GDL can be build as a python module (GDL subroutines can be called from python).

GUI support (widgets) is officially provided since the 0.9 version (but it's not complete yet).

GDL is free software licensed under the GPL.

History edit

Language Syntax edit

Data Structures edit

Operators edit

Control structures edit

  • 3.1 Compound statements
  • 3.2 Selection statements
  • 3.3 Iteration statements
  • 3.4 Jump statements
    • 3.4.1 Storing the address of a label

Functions edit

  • 4.1 Syntax
    • 4.1.1 Function Pointers
  • 4.2 Global structure
  • 4.3 Argument passing
    • 4.3.1 Array parameters

Miscellaneous edit

  • 5.1 Reserved keywords
  • 5.2 Case sensitivity
  • 5.4 Command-line arguments
  • 5.5 Evaluation order
  • 5.6 Undefined behavior

Interpreter Operation edit

Function List edit

Library procedures edit

Total number of library procedures available from the GDL base system (>400) is dependent on compile-time configuration (see the GDL documentation draft for a list) .