About Programming in IDL
IDL applications range from the simple (a short program entered at the IDL command line) to the complex (large programs with graphical user interfaces). Whether you are writing a small program to analyze a single data set or a large-scale application for commercial distribution, you'll need to understand the programming concepts used by the IDL language.
Programming in IDL feels familiar to developers already familiar with C, C++, or FORTRAN. Like these languages, IDL is a high-level programming language with similar syntax and operation.
While the programming environment is similar enough to make the transition easy, IDL's structure and tools make programming faster and more efficient. The following list outlines the benefits IDL offers over other programming languages:
- Array operations—using arrays creates more efficient code by eliminating the need for loops to perform operations on each data element.
- Dynamic data types—variables do not need to be explicitly typed because IDL determines the data type from the code context. Variables can be created or changed at any time, even within the same program.
- IDL Workbench Development Environment—provides the interactivity to speed up development, including chromacoding, coding tools, automatic compilation, and visual debugging tools. Programmers can quickly compile and run programs for testing and immediately view any problem areas that cause errors.
- Interactive programming modes—interactive mode allows you to run commands from the command line to immediately test code lines.
- Graphical User Interface (GUI) Tools—IDL provides several ways to develop GUI applications. These tools include:
- Widget Programming—use IDL's library of widget tools to create simple controls such as buttons and sliders. Widget programming provides complete control over user interface design and functionality.
- iTools—use IDL's built-in iTools to quickly visualize data with a minimum of programming, or create your own custom iTool application.
- Built-in routines—IDL provides a huge library of routines for graphical user interface (GUI) programming, numerical analysis, and data visualization.
- Integrated development—IDL is able to make calls to external programs written in other development languages, and provides the ability to call from external programs in IDL.
- Distribution—IDL provides tools that allow you to distribute your applications either as source code or in a compiled binary format called a SAVE file. Anyone with an IDL development license can execute IDL source code. If your colleagues or customers do not have an IDL development license, they can run most compiled IDL applications in the free IDL Virtual Machine. If your application uses features available only with an IDL license, you have the option of purchasing and distributing runtime licenses or embedding a license directly in the compiled application code.
This chapter gives a very brief introduction and overview into programming in IDL. To continue to learn to program in IDL, see the Application Programming manual and the documentation for specific routines in the IDL Reference Guide.