Ch (computer programming)

From Infogalactic: the planetary knowledge core
Jump to: navigation, search

Lua error in package.lua at line 80: module 'strict' not found.

Ch C/C++ interpreter
Original author(s) Harry H. Cheng
Developer(s) SoftIntegration, Inc.
Initial release October 1, 2001; 22 years ago (2001-10-01)
Stable release 7.5.1 / December 2, 2015; 8 years ago (2015-12-02)
Written in C
Operating system Windows, OS X, Linux, AIX, HP-UX, Solaris (SPARC and x86), QNX, FreeBSD
Platform x86, SPARC
Available in English
Type Integrated development environment
License Proprietary software
Standard edition: freeware
Student edition: freeware for students
Professional edition: trialware for 30 days
Website www.softintegration.com

Ch /ˌsˈ/ 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 (numeric methods), and programming in C/C++. Ch is now developed and marketed by SoftIntegration, Inc. A student edition is freely available.

Ch can be embedded in C/C++ application programs. It has numerical computing and graphical plotting features. Ch is a combined shell and IDE.[1] Ch shell combines the features of common shell and C language.[2] ChIDE provides quick code navigation and symbolic debugging. It is based on embedded Ch, Scite and Scintilla.[3][4]

Ch is written in C and runs on Windows, Linux, OS X, 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.[5][6][7][8] An article published by Computer Reseller News (CRN) named Ch as notable among C-based virtual machines for its functionality and the availability of third-party libraries.[9]

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.[10] Ch Control System Toolkit is used for modeling, design, and analysis of continuous-time or discrete-time linear time invariant (LTI) control systems.[11] 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++.[12][13][14][15][16][17][18]

Features

Ch supports the 1999 ISO C Standard (C99) 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 (VLAs), 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:

  • Member functions
  • Mixed code and declaration
  • The this -> pointer
  • Reference type and pass-by-reference
  • Function-style type conversion
  • Classes
  • Private/public data and functions in classes. Ch is compatible with C++ in that by default, members of a class definition are assumed to be private until a 'public' declaration is given
  • Static member of class/struct/union
  • Const member functions
  • The new and delete operators
  • Constructors and destructors
  • Polymorphic functions
  • The scope resolution operator ::
  • The I/O functions cout, cerr, and cin with endl
  • Arguments for variadic functions are optional

Ch supports classes in C++ with added abilities, including:

  • Classes inside member functions
  • Nested functions with classes
  • Passing member function to argument of pointer-to-function type of functions

Ch can interact with existing C/C++ libraries and call C/C++ functions from Ch script.[19] 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.[20][21][22]

Ch has a built-in string type (string_t) for automatic memory allocation and de-allocation. It supports shell aliases, history, piping, etc.[23][24]

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.[25]

See also

References

  1. Lua error in package.lua at line 80: module 'strict' not found.
  2. Ch Shell
  3. Ch IDE
  4. Lua error in package.lua at line 80: module 'strict' not found.
  5. Lua error in package.lua at line 80: module 'strict' not found.
  6. Lua error in package.lua at line 80: module 'strict' not found.
  7. Lua error in package.lua at line 80: module 'strict' not found.
  8. Lua error in package.lua at line 80: module 'strict' not found.
  9. Lua error in package.lua at line 80: module 'strict' not found.
  10. Lua error in package.lua at line 80: module 'strict' not found.
  11. Lua error in package.lua at line 80: module 'strict' not found.
  12. Lua error in package.lua at line 80: module 'strict' not found.
  13. Lua error in package.lua at line 80: module 'strict' not found.
  14. Lua error in package.lua at line 80: module 'strict' not found.
  15. Lua error in package.lua at line 80: module 'strict' not found.
  16. Lua error in package.lua at line 80: module 'strict' not found.
  17. Lua error in package.lua at line 80: module 'strict' not found.
  18. Lua error in package.lua at line 80: module 'strict' not found.
  19. Lua error in package.lua at line 80: module 'strict' not found.
  20. Lua error in package.lua at line 80: module 'strict' not found.
  21. Lua error in package.lua at line 80: module 'strict' not found.
  22. Lua error in package.lua at line 80: module 'strict' not found.
  23. Lua error in package.lua at line 80: module 'strict' not found.
  24. Lua error in package.lua at line 80: module 'strict' not found.
  25. Lua error in package.lua at line 80: module 'strict' not found.

Further reading

  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.

External links