CINT is a
command line
A command-line interface (CLI) is a means of interacting with software via command (computing), commands each formatted as a line of text. Command-line interfaces emerged in the mid-1960s, on computer terminals, as an interactive and more user ...
C/
C++ interpreter
Interpreting is translation from a spoken or signed language into another language, usually in real time to facilitate live communication. It is distinguished from the translation of a written text, which can be more deliberative and make use o ...
that was originally included in the
object oriented
Object-oriented programming (OOP) is a programming paradigm based on the concept of '' objects''. Objects can contain data (called fields, attributes or properties) and have actions they can perform (called procedures or methods and impleme ...
data analysis
package ROOT
In vascular plants, the roots are the plant organ, organs of a plant that are modified to provide anchorage for the plant and take in water and nutrients into the plant body, which allows plants to grow taller and faster. They are most often bel ...
. Although intended for use with the other faculties of ROOT, CINT can also be used as a standalone addition to another program that requires such an interpreter. In 2013,
CERN
The European Organization for Nuclear Research, known as CERN (; ; ), is an intergovernmental organization that operates the largest particle physics laboratory in the world. Established in 1954, it is based in Meyrin, western suburb of Gene ...
switched to the Cling C++ interpreter, so CINT is now distributed standalone by the author.
CINT is an interpreted version of C/C++, much in the way
BeanShell is an interpreted version of
Java
Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
. In addition to being a language interpreter, it offers certain
Bash-like
shell
Shell may refer to:
Architecture and design
* Shell (structure), a thin structure
** Concrete shell, a thin shell of concrete, usually with no interior columns or exterior buttresses
Science Biology
* Seashell, a hard outer layer of a marine ani ...
features such as history and
tab-completion. To accomplish the latter, it relies heavily on the
reflection support built into ROOT. User classes that follow these interfaces may also take advantage of these features.
The language originally interpreted by CINT was actually something of a hybrid between C and C++, covering about 95% of ANSI C and 85% of C++. The syntax, however, is a bit more forgiving than either language. For example, the operator
->
can be replaced by
.
with only an optional warning. In addition, statements on the command line do not need to end with a semi-colon, although this is necessary for statements in macros.
As an alternative to CINT,
ROOT
In vascular plants, the roots are the plant organ, organs of a plant that are modified to provide anchorage for the plant and take in water and nutrients into the plant body, which allows plants to grow taller and faster. They are most often bel ...
also provides Cling which is an
REPL application using
LLVM
LLVM, also called LLVM Core, is a target-independent optimizer and code generator. It can be used to develop a Compiler#Front end, frontend for any programming language and a Compiler#Back end, backend for any instruction set architecture. LLVM i ...
's
Clang
Clang () is a compiler front end for the programming languages C, C++, Objective-C, Objective-C++, and the software frameworks OpenMP, OpenCL, RenderScript, CUDA, SYCL, and HIP. It acts as a drop-in replacement for the GNU Compiler ...
as a C++ JIT compilation environment.
[{{cite web , url=http://root.cern.ch/drupal/content/cling , title=C++ interpreter Cling , publisher=Rene Brun and Fons Rademakers , accessdate=December 25, 2020]
See also
*
C/C++ Interpreter Ch
References
C programming language family
Interpreters (computing)