Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]

PRO


Syntax | Arguments | Keywords | Examples | Version History

The PRO statement defines an IDL procedure.

Note
For information on using the PRO statement, see Procedures and Functions.

Syntax

PRO Procedure_Name, argument1, ..., argumentn
   ...
END

Arguments

argumentn

A parameter that is passed to the procedure.

Keywords

None.

Examples

The following example demonstrates the use of arguments in a PRO statement:

PRO MYPROCEDURE 
   X = 5  
   ; Call the ADD procedure: 
   ADD, 3, X 
END 
 
PRO ADD, A, B 
   PRINT, 'A = ', A 
   PRINT, 'B = ', B 
   A = A + B 
   PRINT, 'A = ', A 
END 

After running myprocedure.pro, IDL returns:

A =   3 
B =   5 
A =   8 

Version History

Introduced: Original


Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]