The ARG_PRESENT function returns TRUE if its parameter will be passed back to the caller. This function is useful in user-written procedures to determine if a created value remains within the scope of the calling routine. ARG_PRESENT helps the caller avoid expensive computations and prevents heap leaks. For example, assume that a procedure exists which depends upon an argument passed by the caller:
PRO pass_it, i
If the caller does not specify i, the program may not function properly. You can check to make sure that an argument was specified by using the following statement:
IF ARG_PRESENT(i) THEN BEGIN