The features described in this topic are obsolete
and should not be used in new IDL code.

SIZE Executive Command

This command is obsolete and is should not be used in new IDL code.

.SIZE Code_Size, Data_Size

The .SIZE command resizes the memory area used to compile programs. The default code and data area sizes are 32,768 and 8,192 bytes, respectively. These sizes represent a compromise between an unlimited program space and conservation of memory. User procedures and functions are compiled in this large program area. After successful compilation, a new memory area of the required size is allocated to contain the newly compiled program unit.

Resizing the code and data areas erases the currently compiled main program and all main program variables. For example, to extend the code and data areas to 30,000 and 5,000 bytes, respectively, use the following statement:

.SIZE 30000 5000 

Each user-defined procedure, function, and main program has its own code area that contains the compiled code and constants. Although the maximum size of these areas is set by the .SIZE command, there is virtually no limit to the number of program units. Procedures or functions that run out of code area space should be broken into multiple program units.

The data area contains information describing the user-defined variables and common blocks for each procedure, function, or main program. Note that the "data area" is not the space available for variable storage, but the space available for that program unit's symbol table.

Warning
Users are sometimes confused about the nature of the code and data areas. Note that there are separate code and data areas for each compiled function, routine, or main program. The HELP command can be used to see the current sizes of the code and data areas for the program unit in which the HELP function is called.

For example, to see the sizes of the code and data areas for the main program level, enter the following at the IDL prompt:

HELP 

Each compiled function and procedure has its own code and data areas. If the compiled routine does not use the full amount of code space allocated by the default code area size, the code area "shrinks" to just the size the routine needs. For example, enter and compile a simple procedure from the IDL prompt by entering:

.RUN 
- PRO EXAMPLE 
- PRINT, "Here are the code and data areas for this procedure:" 
- HELP 
- END 

Call the EXAMPLE procedure from the command line to see the result:

EXAMPLE 

The third line of output from the HELP procedure displays:

Code area used: 100.00% (100/100), Data area used: 2.02% (2/99) 

Note that the code area for the EXAMPLE procedure is completely filled and that the total size of the code area is just 100 bytes.