Content deleted Content added
m Fixed Grammar |
SanaMinaMomo (talk | contribs) No edit summary |
||
Line 25:
}}
'''CH''' {{IPAc-en|ˌ|s|iː|ˈ|eɪ|tʃ}} is a proprietary [[cross-platform]] [[C (programming language)|C]] and [[C++]] [[Interpreter (computing)|interpreter]] and [[scripting language environment]]. It was 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'''., with multiple versions available, including a freely available student edition, and a CH Professional Edition for [[Raspberry Pi]] which is free for non-commercial use.
CH can be embedded in C
CH is written in C and runs on [[Microsoft Windows|Windows]], [[Linux]], [[macOS]], [[FreeBSD]], [[IBM AIX|AIX]], [[Solaris (operating system)|Solaris]], [[QNX]], and [[HP-UX]]. It supports [[C90 (C version)|C90]] and major [[C99]] features, but it does not support the full set of C++ features. C99 complex number, [[IEEE 754|IEEE-754]] floating-point arithmetic, and [[variable-length array]] features were supported in CH before they became part of the
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|six-bar linkage,]] crank-slider mechanism, and cam-follower system.<ref>{{cite journal |last= Cheng |first= Harry |year= 2006 |title= Object-Oriented Interactive Mechanism Design and Analysis |journal= Engineering with Computers |volume= 21 |issue= 3 |pages= 237–246 |doi= 10.1007/s00366-005-0008-4 |s2cid= 16996625 }}</ref> CH Control System Toolkit is used for
CH is now used and integrated into the curriculum by many high schools and universities to teach computing and programming in C/C++.<ref>{{cite journal |last= Cheng |first= Harry |year= 2009 |title= C for the Course |pages= 50–52 |url= http://memagazine.asme.org/Articles/2009/september/C_Course.cfm |publisher= ASME Mechanical Engineering Magazine}}</ref><ref>{{cite journal |last= Huber |first= Tom |year= 2010 |title= An Introduction to C and Ch: Your One-Stop Shop for Scientific Computing |doi=10.1109/MCSE.2010.82 |journal= Computing in Science & Engineering |volume= 12 |issue= 4 |page= 7}}</ref><ref>{{cite book |last1=Liu |first1=Li |last2= Wang |first2= Zhaoqing|last3=Jiang |first3= Xusheng |title=Proceedings of 2010 IEEE/ASME International Conference on Mechatronic and Embedded Systems and Applications |year= 2010 |pages= 49–52 |publisher= Mechatronics and Embedded Systems and Applications (MESA), IEEE/ASME International Conference|doi=10.1109/MESA.2010.5552033 |chapter=Anchor-based promgramming teaching embedded with Ch platform |isbn=978-1-4244-7101-0 |s2cid=2063024 }}</ref><ref>{{cite book |last1=Furman |first1=B. |title=Proceedings of 2010 IEEE/ASME International Conference on Mechatronic and Embedded Systems and Applications |last2= Wertz |first2= E. |year= 2010 |pages= 70–75 |publisher= Mechatronics and Embedded Systems and Applications (MESA), IEEE/ASME International Conference|doi=10.1109/MESA.2010.5552091 |isbn=978-1-4244-7101-0 |s2cid=12764358 }}</ref><ref>{{cite journal |last1=Zhuang |first1=Hong |last2= Wang |first2= Zhao-qing |year= 2009 |title= Experience of Using Ch for Teaching Computer Programming in C |pages= TP311.11–4 |url= http://en.cnki.com.cn/Article_en/CJFDTOTAL-JYJS200907016.htm |publisher= Computer Education |id=[http://en.cnki.com.cn/Article_en/CJFDTOTAL-JYJS200907016.htm CKNI:SUN:JYJS.0.2009-07-016]}}</ref><ref>{{cite journal |last1=Wang |first1=Rong |year= 2009 |title= Study of C Language Programming Teaching Method on platform Ch |pages= TP312.1–4 |url= http://en.cnki.com.cn/Article_en/CJFDTOTAL-WOLF200905018.htm |publisher= Journal of Weinan Teachers University |id=[http://en.cnki.com.cn/Article_en/CJFDTOTAL-WOLF200905018.htm CNKI:SUN:WOLF.0.2009-05-018]}}</ref><ref>{{cite book |last1=Stopforth |first1=Riaan |title=2013 6th Robotics and Mechatronics Conference (Rob ''Mech'') |year= 2013 |pages= 146–149 |publisher= Robotics and Mechatronics Conference (RobMech)|doi=10.1109/RoboMech.2013.6685507 |isbn=978-1-4799-1518-7 |chapter=Teaching and programming with Ch for tertiary-level mechatronics engineering education |s2cid=23172598 }}</ref> 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,
CH supports [[Lego Mindstorms NXT|LEGO Mindstorms NXT]] and [[Lego Mindstorms EV3|EV3]], [[Arduino]], Linkbot, Finch Robot, RoboTalk and Raspberry Pi, Pi Zero, and ARM for robot programming and learning.<ref>
[http://www.newtonium.com/public_html/Products/RoboWorks/chrobotalk.htm ch robot]</ref><ref>
[http://www.finchrobot.com/software/ch ch finch]</ref><ref>[http://www.softintegration.com/company/press/ch_arm_raspberry_pi_released.htm ch raspberry and arm]{{Dead link|date=June 2019 |bot=InternetArchiveBot |fix-attempted=yes }}</ref> It can also be embedded into the [[LabVIEW]] system design platform and development environment.<ref>{{Cite web|url=http://iel.ucdavis.edu/projects/chlabview/|title=Embedding a C/C++ Interpreter Ch into LabVIEW for Scripting}}</ref>
== 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 array|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 function|Member functions]]
* Mixed code and declaration
* The ''[[this (computer programming)|this]]'' -> pointer
* [[Reference type (C++)|Reference type and pass-by-reference]]
* Function-style type conversion
* [[Classes in C++|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
Line 55:
* The new and delete operators
* Constructors and destructors
* [[Polymorphic function|Polymorphic functions]]
* The [[scope resolution operator
* The I/O functions cout, cerr, and cin with endl
* Arguments for [[variadic function]]s are optional
Line 63:
* Classes inside member functions
* [[Nested function|Nested functions]] with classes
* Passing member function to argument of pointer-to-function type of functions
Line 69:
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.<ref>{{cite magazine |last= Cheng |first= Harry |year= 2009 |title= Speeding-Up Software Development Using Embedded Scripting |pages= 8 |url= http://drdobbs.com/architecture-and-design/212201774 |magazine= Dr. Dobb's Journal}}</ref><ref>{{cite book |last1=Wang |first1=Li-rong |title=2009 IEEE 10th International Conference on Computer-Aided Industrial Design & Conceptual Design |pages=1127–1132 |last2= Bo |first2= Yo|last3=Hagiwara |first3= I |publisher= Computer-Aided Industrial Design & Conceptual Design, 2009. CAID & CD 2009. IEEE 10th International Conference|doi=10.1109/CAIDCD.2009.5375178 |year=2009 |isbn=978-1-4244-5266-8 |s2cid=39307433 }}</ref><ref>{{cite book |last1=Wang |first1=Li-rong |last2= Bo |first2= Yo|last3=Hagiwara |first3= Ichiro |title= An agent based collaborative simplification of 3D mesh model |pages=325–328 |url= http://dl.acm.org/citation.cfm?id=1813032 |year=2009 |publisher= CDVE'09 Proceedings of the 6th international conference on cooperative design, visualization, and engineering|isbn=9783642042645 |series=Cdve'09 }}</ref>
CH has a built-in [[string type]] (string_t) for automatic memory allocation and de-allocation. It supports shell aliases, history,
CH has built-in 2D/3D graphical plotting features and computational [[array data type|arrays]] for numerical computing. A 2D [[linear equation]] of the form ''b = A*x'' can be written verbatim in Ch.<ref>{{cite journal |last= Glassborow |first= Francis |year= 2001 |title= The Ch Language Environment Version 2.0 |url= http://www.softintegration.com/company/pub/accu.html |pages= 36–37 |publisher= C Vu Magazine}}</ref>
|