Skip to content

Instantly share code, notes, and snippets.

@WesternStar
Created November 22, 2015 01:50
Show Gist options
  • Save WesternStar/2e28db7c4caf17d02c84 to your computer and use it in GitHub Desktop.
Save WesternStar/2e28db7c4caf17d02c84 to your computer and use it in GitHub Desktop.
Cling (C/C++ interpreter) meta commands usage
All commands must be preceded by a '.', except
for the evaluation statement { }
==============================================================================
Syntax: .Command [arg0 arg1 ... argN]
.L <filename> - Load the given file or library
.(x|X) <filename>[args] - Same as .L and runs a function with
signature: ret_type filename(args)
.> <filename> - Redirect command to a given file
'>' or '1>' - Redirects the stdout stream only
'2>' - Redirects the stderr stream only
'&>' (or '2>&1') - Redirects both stdout and stderr
'>>' - Appends to the given file
.undo [n] - Unloads the last 'n' inputs lines
.U <filename> - Unloads the given file
.I [path] - Shows the include path. If a path is given -
adds the path to the include paths
.O <level> - Sets the optimization level (0-3)
(not yet implemented)
.class <name> - Prints out class <name> in a CINT-like style
.files - Prints out some CINT-like file statistics
.fileEx - Prints out some file statistics
.g - Prints out information about global variable
'name' - if no name is given, print them all
.@ - Cancels and ignores the multiline input
.rawInput [0|1] - Toggle wrapping and printing the
execution results of the input
.dynamicExtensions [0|1] - Toggles the use of the dynamic scopes and the
late binding
.printDebug [0|1] - Toggles the printing of input's corresponding
state changes
.storeState <filename> - Store the interpreter's state to a given file
.compareState <filename> - Compare the interpreter's state with the one
saved in a given file
.stats [name] - Show stats for various internal data
structures (only 'ast' for the time being)
.help - Shows this information
.q - Exit the program
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment