X

Help Articles are product support tips and information straight from the NV5 Geospatial Technical Support team developed to help you use our products to their fullest potential.



1607 Rate this article:
No rating

WARNING: Attempt to call undefined function: 'REVERSE' (when running an IDL SAV file)

PROBLEM:

When you execute an IDL SAV file application, you get a warning about precisely the REVERSE function being undefined:

Warning: Attempt to call undefined function: 'REVERSE'

BACKGROUND & CAUSE:

With the release of IDL 8.8.1, the REVERSE function was ported from PRO code to internal C code to improve performance. Thus, if you create a SAV file application in IDL versions 8.8.1+ which uses REVERSE, that SAV file application will fail when run via prior IDL versions. 

Basically the issue is that when you make the SAV file in IDL 8.8.1, REVERSE is a system function built into the idl.dll and REVERSE.pro does not exist in the lib folder of IDL 8.8.1 installation. Thus it doesn't get compiled into the SAV file application. However, when the SAV file is then run in prior IDL versions, REVERSE is not part of idl.dll where it expects and it actually is only in PRO code which isn't usable in SAV files. In summary, 8.8.1 SAV files that make use of the REVERSE function are not backwards compatible to be used in older versions.

WORK-AROUNDS:

1) The best practice for IDL application development is to build your SAV file in the oldest version of IDL you will be running the application with (i.e. do not run the SAV file in an older version than it was built). In the case of this specific REVERSE problem, make sure to run the SAV file application in at least IDL version 8.8.1. 

2) Alternatively, if you absolutely must run the application in an older IDL version, you can copy REVERSE.pro from an older version of IDL into the IDL 8.8.1 lib folder. Then when you are building the SAV file, do an explicit .compile on REVERSE so it is included. This process may spawn some ignorable duplicate routine warnings:

•    .FULL_RESET
•    .COMPILE YourRoutine
•    .COMPILE reverse.pro
•    RESOVLE_ALL
•    SAVE, /routines, filename = ‘…sav’

 

Created by BC-NA (4/4/22), Reviewed by JU (4/5/22)

Please login or register to post comments.
Featured

End-of-Life Policy Enforcement for ENVI 5.3 / IDL 8.5 and Earlier Versions

5/6/2024

April 1, 2024 Dear ENVI/IDL Customer,  We are reaching out to notify you of our supported... more »

How to Upgrade licenses to ENVI 6.x / IDL 9.x

12/5/2023

What is the new Upgrade function? Starting with ENVI 6.0 and IDL 9.0, we have implemented an... more »

What to do if the 'License Administrator - License Server' for the Next-Generation License Server does not start?

6/13/2023

Background: With the release of ENVI 5.7 & IDL 8.9 and the corresponding Next-Generation licensing... more »

Next-Generation Licensing FAQ

4/28/2023

  NV5 Geospatial has adopted a new licensing technology for all future releases of our ENVI, IDL... more »

The IDL Virtual Machine

6/6/2013

What is the IDL Virtual Machine? An IDL Virtual Machine is a runtime version of IDL that can... more »