The following enhancements have been made to the core language for the 6.1 release:
The new IDL_Savefile object provides complete query and restore capabilities for IDL SAVE files (created with the SAVE procedure). Using IDL_Savefile, you can retrieve information about the number and size of the various items contained in a SAVE file (variables, common blocks, routines, etc). Individual items can be selectively restored from the SAVE file.
Use IDL_Savefile instead of the RESTORE procedure when you need to obtain detailed information on the items contained within a SAVE file without first restoring it, or when you wish to restore only selected items. Use RESTORE when you want to restore everything from the SAVE file using a simple interface.
For more information, see IDL_Savefile.
Three new functions allow you to examine or alter variables located outside the local scope of the currently executing function or procedure. Programs, usually those with graphical user interfaces that import and export data from the caller's scope need to be able to access the user's data variables directly, without requiring them to explicitly pass those variables to the application as parameters. The new SCOPE_VARFETCH function is used to access those variables, while SCOPE_VARNAME is used to obtain the correct names with which to refer to the variables. The iTools are examples of programs that need to be able to perform such operations. Using these new functions also allows you to retrieve variable values in IDL Virtual Machine applications, removing the need to use the EXECUTE function. See SCOPE_LEVEL, SCOPE_VARFETCH, and SCOPE_VARNAME for additional information.
In addition, you can retrieve information about variables in a particular scope using the LEVEL keyword to the HELP procedure. See HELP for additional information.
The new DESCRIPTION keyword to the SAVE procedure allows you to associate a descriptive string value with a SAVE file. The value of the DESCRIPTION string can be used by IDL programs to identify data; it can also be used as an aid in managing large collections of data or routines. See RESTORE or SAVE for additional information.
The new FILE_OFFSET keyword to the SIZE function allows you to retrieve the ASSOC file offset for the specified expression. The SNAME keyword allows you to retrieve the name of the structure definition for the specified expression, if it is a named structure. See SIZE for additional information.
The new IDL_CPU_TPOOL_NTHREADS environment variable allows you to set the default number of threads used by IDL in thread pool computations at startup. Set this environment variable to a value greater than 0 to specify the number of threads IDL should use. On systems shared by multiple users, you may wish to set this environment variable so that IDL uses the specified number of threads instead of defaulting to the number of CPUs present in the underlying hardware.
Two new keywords to the CPU procedure provide the ability to set the
IDL's explicitly formatted input/output subsystem has been enhanced with the following new features:
A new integer format code, B, has been added to IDL's formatting engine. The B format code is used to read and write binary values. The syntax for the B format code is similar to the other integer format codes (I, O, and Z):
[n]B[-][w][.m]
where:
See B, I, O, and Z Format Codes for complete details.
The B format code can also be used in C printf-style quoted strings, using the syntax "%b".
For example, the following IDL statements:
PRINT, FORMAT='(B)', 3000 PRINT, FORMAT='(B15)', 3000 PRINT, FORMAT='(B14.14)', 3000 PRINT, FORMAT='(B0)', 3000 PRINT, FORMAT='(%"%15b")', 3000
Produce the following output:
101110111000 101110111000 00101110111000 101110111000 101110111000
The "+" character can be included before the width value of a numeric format code (B, D, E, F, G, I, O, Z or any of the numeric calendar formatting codes) to specify that positive numbers should be output with a "+" prefix. Normally, negative numbers are output with a "-" prefix and positive numbers have no sign prefix. Non-decimal numeric codes (B, O, and Z) allow the specification of the "+" flag, but ignore it.
See Syntax of Format Codes for complete details.
For example, the following the following IDL statements:
PRINT, FORMAT='(I0, ", ", I0)', -200, 200 PRINT, FORMAT='(I+0, ", ", I+0)', -200, 200
Produce the following output:
-200, 200 -200, +200
The "-" character can be included before the width value of a string or numeric format code (A, B, D, E, F, G, I, O, Z or any of the calendar formatting codes) to specify that the output text should be left-justified rather than right-justified.
See Syntax of Format Codes for complete details.
For example, the following the following IDL statements:
PRINT, FORMAT='(I)', 234 PRINT, FORMAT='(I-)', 234
Produce the following output:
234 234
If the width specification of a numeric format code (B, D, E, F, G, I, O, Z or any of the numeric calendar formatting codes) begins with the numeral zero, IDL will pad the value with zeroes rather than blanks. For example:
PRINT, FORMAT='(I08)', 300
produces the following output:
00000300
When padding values with zeroes, note the following:
See Syntax of Format Codes for complete details.
The floating-point format codes (F, D, E, G, and CSF) all accept width specifications of the form [w.d] where w is an optional width specification (0 £ w £ 256) specifying the number of digits to be transferred and d is an optional width specification (1 £ d < w) specifying either the number of positions after the decimal point (F, D, E, and CSF format codes) or the number of significant digits displayed (G format code).
Setting w to 0 (zero) means that you are requesting "natural width" output, meaning that the output contains no leading or trailing whitespace. In previous releases, if w was 0, IDL would ignore the value of d for the F, D, E, and CSF format codes. Now, if w is 0 and d is supplied for these codes, IDL will generate natural width output with the specified number of digits after the decimal point.
The behavior of the G format code has not changed. The d field specifies the number of significant digits of output, and as in previous releases, the value of d is used even when a natural width output is specified.
The new WINDOWS_SHORT_NAMES keyword to the FILE_SEARCH function provides greater control over how FILE_SEARCH matches Microsoft Windows "8.3 short names". See FILE_SEARCH for additional information.
The new NAME keyword to the CREATE_STRUCT function allows you to create a named structure. This can be especially useful in an IDL Virtual Machine application. You can instantiate a structure defined in a SAVE file by passing in a string containing the structure name, avoiding the need to use the EXECUTE function. See CREATE_STRUCT for additional information.