|
IDL Reference Guide: Procedures and Functions |
|
The PRO statement defines an IDL procedure.
| Note For information on using the PRO statement, see Creating and Running Programs in IDL and Creating Procedures and Functions. |
PRO Procedure_Name, argument1, ..., argumentn
. . .
END
A parameter that is passed to the procedure.
None.
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 you run myprocedure.pro, IDL returns: