ArticleslgStudy

computer science

Ch (computer programming)

Ch (computer programming) is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Ch (computer programming) rather than just read about it. In short: CH is a proprietary cross-platform C and C++ interpreter and scripting language environment. It was designed by Harry Cheng as a scripting language for beginners to learn mathematics, computing, numerical analysis (numeric methods), and programming in C/C++.

Key takeaways

  • Ch (computer programming) belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Ch (computer programming) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Ch (computer programming) from memory before moving on to harder problems.

Reference excerpt

CH is a proprietary cross-platform C and C++ interpreter and scripting language environment. It was designed by Harry 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.. Free versions include the student edition, and the non-commercial Professional Edition for Raspberry Pi. CH can be embedded in C and C++ application programs. It has numerical computing and graphical plotting features. CH is combined of both 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. CH was notable among C-based virtual machines for its functionality and the availability of third-party libraries. CH has many tool kits that extend its functions. For example, the CH Mechanism Toolkit is used for design and analysis of commonly used mechanisms such as four-bar linkage, five-bar linkage, six-bar linkage, crank-slider mechanism, and cam-follower system. CH Control System Toolkit is used for the design, analysis, and modelling of continuous-time or discrete-time linear time-invariant (LTI) control systems. Both tool kits include the source code. CH has been integrated into free C-STEM Studio, a platform for learning computing, science, technology, engineering, and mathematics (C-STEM) with robotics. C-STEM Studio is developed by the UC Davis Center for Integrated Computing and STEM Education, offering a 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 (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. 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 (string_t) for automatic memory allocation and de-allocation. It supports shell aliases, history, and piping. 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.

See also CINT Pike (programming language)

References

Further reading Heller, Martin (2001). "The Ch Language Environment". Byte. Archived from the original on November 16, 2001. {{cite journal}}: Cite journal requires |journal= (help) Cheng, Harry (2002). "C99 & Numeric Computing". Dr. Dobb's Journal. pp. 28–34. Cheng, Harry (2006). "Ch: A C/C++ Interpreter for Script Computing". Dr. Dobb's Journal. pp. 6–12. Cheng, Harry (2009). C For Engineers & Scientists, An Interpretive Approach. McGraw-Hill. ISBN 978-0-07-729046-7. Cheng, Harry (2011). C For Engineers & Scientists (Chinese ed.). Higher Education Press. ISBN 978-0-07-729046-7.

External links Official website, SoftIntegration Mobile-C: a Multi-Agent Platform for Mobile C/C++ Agents Home Page C-STEM Studio

Worked examples

Example 1 — a first encounter with Ch (computer programming)

Start with the simplest possible case. Write down what Ch (computer programming) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Ch (computer programming) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Ch (computer programming) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Ch (computer programming)

In research
Ch (computer programming) appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Ch (computer programming) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Ch (computer programming) is common in secondary-school and first-year university syllabi. It links to neighbouring topics C programming language family, Educational programming languages, Interpreters (computing), so understanding it makes those chapters shorter.
In everyday life
Look for Ch (computer programming) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Ch (computer programming)” →

How to study Ch (computer programming) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Ch (computer programming) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Ch (computer programming) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Ch (computer programming) in simple terms?

CH is a proprietary cross-platform C and C++ interpreter and scripting language environment. It was designed by Harry Cheng as a scripting language for beginners to learn mathematics, computing, numerical analysis (numeric methods), and programming in C/C++.

Why does Ch (computer programming) matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Ch (computer programming)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Ch (computer programming).

Tags

  • C programming language family
  • Educational programming languages
  • Interpreters (computing)
  • Pedagogic integrated development environments

Keep exploring