Search code examples
debuggingvariablesidl-programming-language

Get variable value in IDL without using "print," sentence


In IDL console I want another way in order to obtain variable value, for debug purpose. This is how I do now:

IDL> cvel=299.792458e6
IDL> print, cvel
 2.99792e+008

There is a easy and quick way to obtain cvel value in console? Like for example in the following (erroneous) command:

IDL> cvel
% Attempt to call undefined procedure/function: 'CVEL'.

Solution

  • This was added to IDL recently (at least by IDL 8.5, maybe earlier):

    IDL> cvel=299.792458e6
    IDL> cvel
       2.9979245e+08