The .RESET_SESSION command resets much of the state of an IDL session without requiring the user to exit and restart the IDL session. After the reset is complete, the startup file, if one is specified, is run.

The command performs the following actions in the reset:

  • Returns current execution point to $MAIN$ (RETALL)
  • Clears the path cache (see PATH_CACHE for details)
  • Closes all files except the standard 3 units, the JOURNAL file (if any), and any files in use by graphics drivers
  • Destroys or removes the following:
  • All local variables in $MAIN$
  • All widgets (exit handlers are not called)
  • All windows and pixmaps for the current window system graphics device are closed (including all common blocks)
  • All cursors created with REGISTER_CURSOR
  • All handles
  • All user-defined system variables
  • All pointer and object reference heap variables (object destructors are not called)
  • All user-defined structure definitions
  • All user-defined object definitions
  • All compiled user functions and procedures, including the main program ($MAIN$), if any
  • Any memory segments created by SHMMAP
  • Disables SHMDEBUG mode
  • Resets all system variables, (including the direct graphics system variables !ORDER, !MAP, !MOUSE, !P, !X, !Y, !Z). The following variables get their initial values from IDL preferences: !CPU, !DIR, !EDIT_INPUT, !ERROR_STATE, !EXCEPT, !HELP_PATH, !MSG_PREFIX, !PATH, !PROMPT, and !QUIET.
  • Resets the current direct-graphics device, which returns to the startup default, based on the IDL_DEVICE preference. Device-specific values are returned to their defaults.
  • Resets the status of the path cache (enabled or disabled), based on the IDL_PATH_CACHE_DISABLE preference.
  • Resets the state of the IDL profiler module (for more information, see PROFILER).

The command does not do the following:

  • The saved commands and output log are not erased.
  • Graphics drivers are not reset to their full uninitialized state. However, all windows and pixmaps for the current window system device are closed.
  • The following files are not closed:
  • Stdin (LUN 0)
  • Stdout (LUN -1)
  • Stderr (LUN -2)
  • The journal file (!JOURNAL) if one is open
  • Any files in use by graphics drivers (e.g., PostScript)
  • Dynamically loaded graphics drivers (LINKIMAGE) are not removed, nor are any dynamic sharable libraries containing such drivers, even if the same library was also used for another purpose such as CALL_EXTERNAL, LINKIMAGE system routines, or DLMs. See the .FULL_RESET_SESSION executive command to unload dynamic libraries.
  • Message blocks are not removed. See the .FULL_RESET_SESSION executive command to remove message blocks loaded by DLMs or created using the DEFINE_MSGBLK or DEFINE_MSGBLK_FROM_FILE routines.

Note: .RESET_SESSION is an executive command. Executive commands can only be used at the IDL command prompt, not in programs.

Syntax


.RESET_SESSION

Version History


7.0

Breakpoints are no longer cleared.

See Also


.FULL_RESET_SESSION