Ch (computer programming)


Ch is a proprietary cross-platform C and C++ interpreter and scripting language environment, originally designed by Harry H. Cheng as a scripting language for beginners to learn mathematics, computing, numerical analysis, and programming in C/C++. Ch is now developed and marketed by SoftIntegration, Inc. A student edition is freely available. Ch Professional Edition for Raspberry Pi is free for non-commercial use.
Ch can be embedded in C/C++ application programs. It has numerical computing and graphical plotting features. Ch is a combined shell and IDE. Ch shell combines the features of common shell and C language. ChIDE provides quick code navigation and symbolic debugging. It is based on embedded Ch, Scite and Scintilla.
Ch is written in C and runs on Windows, Linux, macOS, FreeBSD, AIX, Solaris, QNX, and HP-UX. It supports C90 and major C99 features, but it does not support the full set of C++ features. C99 complex number, IEEE-754 floating-point arithmetic, and variable-length array features were supported in Ch before they became part of the C99 standard. An article published by Computer Reseller News named Ch as notable among C-based virtual machines for its functionality and the availability of third-party libraries.
Ch has many toolkits that extend its functions. For example, Ch Mechanism Toolkit is used for design and analysis of commonly used mechanisms such as fourbar linkage, five-bar linkage, six-bar linkage, crank-slider mechanism, and cam-follower system. Ch Control System Toolkit is used for modeling, design, and analysis of continuous-time or discrete-time linear time invariant control systems. Both toolkits includes the source code.
Ch is now used and integrated into curriculum by many high schools and universities to teach computing and programming in C/C++. Ch has been integrated into free C-STEM Studio, a platform for learning computing, science, technology, engineering, and mathematics with robotics. C-STEM Studio is developed by UC Davis Center for Integrated Computing and STEM Education. It offers the curriculum for K-12 students.
Ch supports LEGO Mindstorms NXT and EV3, Arduino, Linkbot, Finch Robot, RoboTalk and Raspberry Pi, Pi Zero, and ARM for robot programming and learning. It can also be embedded into the LabVIEW system-design platform and development environment.

Features

Ch supports the 1999 ISO C Standard and C++ classes. It is a superset of C with C++ classes. Several major features of C99 are supported, such as complex numbers, variable length arrays, IEEE-754 floating-point arithmetic, and generic mathematical functions. The specification for wide characters in Addendum 1 for C90 is also supported.
C++ features available in Ch include:
Ch supports classes in C++ with added abilities, including:
Ch can interact with existing C/C++ libraries and call C/C++ functions from Ch script.
As a C/C++ interpreter, Ch can be used as a scripting engine and extension language for applications. Pointers to arrays or variables can be passed and shared in both C-compiled and Ch scripting contexts. One example of an embedded Ch scripting application is Mobile-C, which has been used for collaborative visualization of distributed mesh model.
Ch has a built-in string type for automatic memory allocation and de-allocation. It supports shell aliases, history, piping, etc.
Ch has built-in 2D/3D graphical plotting features and computational arrays for numerical computing. A 2D linear equation of the form b = A*x can be written verbatim in Ch.