Ch (computer programming)

This is an old revision of this page, as edited by Philip Torchinsky (talk | contribs) at 06:40, 1 February 2013. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Ch (/[invalid input: 'icon']ˌsˈ/) is a proprietary cross-platform C and C++ interpreter originally designed by Harry H. Cheng as a scripting language for beginners to learn mathematics, computing, numeric methods, and programming in C/C++. Ch is now developed and marketed by SoftIntegration, Inc. A student edition is freely available.

C/C++ Interpreter Ch
Developer(s)SoftIntegration, Inc.
Initial releaseError: All values must be integers (help)
Stable release
7.0 / February 2, 2012; 13 years ago (2012-02-02)
Written inC
Operating systemMicrosoft Windows, Mac OS X, Linux, AIX, HP-UX, Solaris (SPARC and X86), QNX, FreeBSD
Available inEnglish
TypeIntegrated development environment
LicenseProprietary software
Standard edition: Freeware
Student edition: Freeware for Students
Professional edition: Trialware for 30 days
Websitewww.softintegration.com

Ch can be embedded into the C/C++ application programs. It has numerical computing and graphical plotting features. ChIDE provides quick code navigation and step-by-step debug features. It is based on embedded Ch, Scite and Scintilla.[1]

Ch can also be run as an interactive shell to execute C statements and scripts. Unix commands can run in Unix Ch shell, and Windows commands can run in Windows Ch Shell.[2]

Ch is written in C and runs under Microsoft Windows, Linux, Mac 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.[3][4][5][6] An article published by CRN named Ch as notable among C-based virtual machines for its functionality and the availability of third-party libraries.[7]

Ch is now used and integrated into curriculum by many universities and high schools for learning computing and programming in C/C++.[8][9][10][11][12][13]

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.

The following C++ features are available in Ch:

  • 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 the following additional capabilities:

  • 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.[14] 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.[15][16][17]

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

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

See also

References

  1. ^ Ch IDE
  2. ^ Wang, Gary (2002). "Ch Solves Portability Headaches". IEEE Spectrum. {{cite journal}}: Cite journal requires |journal= (help)
  3. ^ Cheng, Harry (1993). "Handling of Complex Numbers in the Ch Programming Language". Scientific Programming: 76–106.
  4. ^ Cheng, Harry (1993). "Scientific Computing in the Ch Programming Language". Scientific Programming: 49–75. {{cite journal}}: Cite journal requires |journal= (help)
  5. ^ Cheng, Harry (1995). "Extending C and FORTRAN for Design Automation". ASME Trans., Journal of Mechanical Design: 390–395. {{cite journal}}: Cite journal requires |journal= (help)
  6. ^ Cheng, Harry (1995). "Extending C with arrays of variable length". Computer Standards & Interfaces. 17 (4). Computer Standards & Interfaces: 375–406. doi:10.1016/0920-5489(95)00007-H.
  7. ^ Morejon, Mario (2006). "Ch Language Rivals Java Functionality". CRN. {{cite journal}}: Cite journal requires |journal= (help)
  8. ^ Cheng, Harry (2009). "C for the Course". ASME Mechanical Engineering Magazine: 50–52. {{cite journal}}: Cite journal requires |journal= (help)
  9. ^ Huber, Tom (2010). "An Introduction to C and Ch: Your One-Stop Shop for Scientific Computing". Computing in Science & Engineering. 12 (4). IEEE Computing in Science and Engineering: 7. doi:10.1109/MCSE.2010.82.
  10. ^ Liu, Li; Wang, Zhaoqing; Jiang, Xusheng (2010). "Anchor-based programming teaching embedded with Ch platform". Mechatronics and Embedded Systems and Applications (MESA), IEEE/ASME International Conference: 49–52. {{cite journal}}: Cite journal requires |journal= (help)
  11. ^ Furman, B.; Wertz, E. (2010). "A first course in computer programming for mechanical engineers". Mechatronics and Embedded Systems and Applications (MESA), IEEE/ASME International Conference: 70–75. {{cite journal}}: Cite journal requires |journal= (help)
  12. ^ ZHUANG, Hong; WANG, Zhao-qing (2009). "Experience of Using Ch for Teaching Computer Programming in C". Computer Education: TP311.11–4. Template:CNKI. {{cite journal}}: Cite journal requires |journal= (help)
  13. ^ WANG, RONG (2009). "Study of C Language Programming Teaching Method on platform Ch". Journal of Weinan Teachers University: TP312.1–4. Template:CNKI. {{cite journal}}: Cite journal requires |journal= (help)
  14. ^ Wilson, Matthew (2004). "Open-RJ and Ch". Dr. Dobb's Journal. {{cite journal}}: Cite journal requires |journal= (help)
  15. ^ Cheng, Harry (2009). "Speeding-Up Software Development Using Embedded Scripting". Dr. Dobb's Journal: 8–8. {{cite journal}}: Cite journal requires |journal= (help)
  16. ^ Wang, Li-rong; Bo, Yo; Hagiwara, I. "Mobile-C based agent management for collaborative visualization of distributed mesh model". Computer-Aided Industrial Design & Conceptual Design, 2009. CAID & CD 2009. IEEE 10th International Conference. {{cite journal}}: Cite journal requires |journal= (help)
  17. ^ Wang, Li-rong; Bo, Yo; Hagiwara, Ichiro (2009). "An agent based collaborative simplification of 3D mesh model". CDVE'09 Proceedings of the 6th international conference on cooperative design, visualization, and engineering. {{cite journal}}: Cite journal requires |journal= (help)
  18. ^ Campbell, Matt (2003). "Ch, A C/C++ Interpreter – New possibilities for people who like C and Unix". MACTECH, the journal of Apple technology. {{cite journal}}: Cite journal requires |journal= (help)
  19. ^ Cheng, Harry (2010). The Ch Language Environment (6.3 ed.). Davis, CA: SoftIntegration , Inc.
  20. ^ Glassborow, Francis (2001). "The Ch Language Environment Version 2.0". C Vu Magazine: 36–37. {{cite journal}}: Cite journal requires |journal= (help)

Further reading