Ch (computer programming): Difference between revisions

Content deleted Content added
Nycrotak (talk | contribs)
No edit summary
Tags: Mobile edit Mobile web edit Advanced mobile edit
 
(98 intermediate revisions by 62 users not shown)
Line 1:
{{Infobox software
{{Multiple issues|COI = May 2011|confusing = June 2011|copy edit = June 2011}}
| name = CH C/C++ interpreter
| logo =
| screenshot =
| caption =
| author = Harry H. Cheng
| developer = SoftIntegration, Inc.
| released = {{Start date and age|2001|10|01}}
| latest release version = 8.0.0
| latest release date = {{Start date and age|2017|11|19}}
| status =
| programming language = [[C (programming language)|C]]
| operating system = [[Microsoft Windows|Windows]], [[OS X]], [[Linux]], [[IBM AIX|AIX]], [[HP-UX]], [[Solaris (operating system)|Solaris]] (SPARC and x86), [[QNX]], [[FreeBSD]]
| platform = [[x86]], [[SPARC]]
| size =
| language = English
| genre = [[Integrated development environment]]
| license = [[Proprietary software]]<br/>'''Standard edition:''' [[freeware]]<br />'''Student edition:''' [[freeware]] for students<br />'''Professional edition:''' [[trialware]] for 30 days
| website = {{URL|www.softintegration.com}}
}}
 
In [[computing]], '''ChCH''' ({{IPAc-en|icon|ˌ|s|iː|ˈ|eɪ|tʃ}}) is a proprietary [[cross-platform]] [[C (programming language)|C]] and [[C++]] [[Interpreter (computing)|interpreter]] originallyand designed[[scripting bylanguage Drenvironment]]. HarryIt H.was designed by '''Harry Cheng''' as a scripting language for beginners to learn math[[mathematics]], computing, numerics[[numerical analysis]] (numeric methods), and programming in C/C++. Ch is now developed and marketed by '''SoftIntegration, Inc'''..; aFree versions include the student edition, isand freelythe availablenon-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'''.<ref>{{cite journal |last= Veeraraghavan |first= Sriranga |year= 2013 |title= An introduction to Ch: Implementing a temperature converter in Ch |url= http://www.techworld.com.au/article/452524/an_introduction_ch_implementing_temperature_converter_ch/ |publisher= ComputerWorld}}</ref> CH shell combines the features of common shell and C language.<ref>[http://www.softintegration.com/docs/ch/shell/ Ch Shell]</ref> ChIDE provides quick code navigation and symbolic debugging. It is based on embedded CH, [[SciTE|Scite]], and [[Scintilla (software)|Scintilla]].<ref>[http://www.softintegration.com/docs/ch/chide/ Ch IDE]</ref><ref>{{cite journal |last= Wang |first= Gary |year= 2002 |title= Ch Solves Portability Headaches |journal= IEEE Spectrum |volume= 39 |issue= 6 |pages= 59 |doi= 10.1109/MSPEC.2002.1049264 |s2cid= 32477309 }}</ref>
Ch is written in C and runs under [[Microsoft Windows]], [[Linux]], [[Mac OS X]], [[FreeBSD]], [[AIX]], [[Solaris (operating system)|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, VLA features were supported in Ch before they became part of the [[C99]] standard.<ref>{{cite journal | last = Cheng | first = Harry | year = 1993 | title = Handling of Complex Numbers in the Ch Programming Language | pages = 76–106 | url = http://iospress.metapress.com/content/xml874m51x1w42w0/|journal=Scientific Programming}}</ref><ref>{{cite journal | last = Cheng | first = Harry | year = 1993 | title = Scientific Computing in the Ch Programming Language | pages = 49–75 | url = http://iospress.metapress.com/content/f225771541203807/ | publisher = Scientific Programming}}</ref><ref>{{cite journal | last = Cheng | first = Harry | year = 1995 | title = Extending C and FORTRAN for Design Automation | pages = 390–395 | url = http://scitation.aip.org/getabs/servlet/GetabsServlet?prog=normal&id=JMDEDB000117000003000390000001&idtype=cvips&gifs=yes&ref=no | publisher = ASME Trans., Journal of Mechanical Design}}</ref><ref>{{cite journal | last = Cheng | first = Harry | year = 1995 | title = Extending C with arrays of variable length | pages = 375–406 | url = http://www.sciencedirect.com/science?_ob=ArticleURL&_udi=B6TYV-3Y6PCHF-V&_user=10&_coverDate=09%2F15%2F1995&_alid=1737140035&_rdoc=1&_fmt=high&_orig=search&_origin=search&_zone=rslt_list_item&_cdi=5628&_sort=r&_st=13&_docanchor=&view=c&_ct=1&_acct=C000050221&_version=1&_urlVersion=0&_userid=10&md5=1369ffa56fdef3033135fa8fc1eb4c15&searchtype=a | publisher = Computer Standards & Interfaces | doi=10.1016/0920-5489(95)00007-H}}</ref>
Among C based virtual machines, Ch is best in its functionality and third-party libraries in rivaling with java, according to CRN Test Center engineers.<ref>{{cite journal | last= Morejon | first=Mario| year = 2006 |title= Ch Language Rivals Java Functionality | url= http://www.crn.com/reviews/applications-os/175804126/ch-language-rivals-java-functionality.htm | publisher = CRN}}</ref>
 
ChCH is written in C and runs underon [[Microsoft Windows|Windows]], [[Linux]], [[Mac OS XmacOS]], [[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]] floating-point arithmetic, VLAand [[variable-length array]] features were supported in ChCH before they became part of the [[C99]] standard.<ref>{{cite journal | last = Cheng | first = Harry | year = 1993 | title = Handling of Complex Numbers in the Ch Programming Language | pages = 76–106 | url = http://iospress.metapress.com/content/xml874m51x1w42w0/|journal=Scientific Programming}}</ref><ref>{{cite journal | last = Cheng | first = Harry | year = 1993 | title = Scientific Computing in the Ch Programming Language | pages = 49–75 | url = http://iospress.metapress.com/content/f225771541203807/ | publisher = Scientific Programming}}</ref><ref>{{cite journal | last = Cheng | first = Harry | year = 1995 | title = Extending C and FORTRAN for Design Automation | pages = 390–395 | url = http://scitation.aip.org/getabs/servlet/GetabsServlet?prog=normal&id=JMDEDB000117000003000390000001&idtype=cvips&gifs=yes&ref=no | publisher = ASME Trans., Journal of Mechanical Design}}</ref><ref>{{cite journal | last = Cheng | first = Harry | year = 1995 | title = Extending C with arrays of variable length | pages = 375–406 | url doi= http://www10.sciencedirect.com1016/science?_ob=ArticleURL&_udi=B6TYV0920-3Y6PCHF5489(95)00007-V&_userH |journal=10 Computer Standards &_coverDate Interfaces |volume=09%2F15%2F1995&_alid 17 |issue=1737140035&_rdoc 4}}{{dead link|date=1&_fmtMarch 2019|bot=high&_origmedic}}{{cbignore|bot=search&_originmedic}}</ref> An article published by ''Computer Reseller News'' ([[CRN Magazine|CRN]]) named CH as notable among C-based virtual machines for its functionality and the availability of third-party libraries.<ref>{{cite journal |last=search&_zone Morejon |first=rslt_list_item&_cdi=5628&_sort=r&_st=13&_docanchor=&view=c&_ct=1&_acct=C000050221&_version=1&_urlVersion=0&_userid=10&md5=1369ffa56fdef3033135fa8fc1eb4c15&searchtype=aMario |year= publisher2006 |title= ComputerCh StandardsLanguage &Rivals InterfacesJava Functionality | doiurl=10 http://www.1016crn.com/0920reviews/applications-5489(95)00007os/175804126/ch-Hlanguage-rivals-java-functionality.htm |publisher= CRN}}</ref>
Ch is now used and integrated into curriculum by many universities and schools{{dubious|date=May 2011}} for learning 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 | url = http://www.computer.org/portal/web/csdl/doi/10.1109/MCSE.2010.82 | publisher = IEEE Computing in Science and Engineering | doi=10.1109/MCSE.2010.82}}</ref><ref>{{cite journal|last1=Liu|first1=Li | last2 = Wang | first2 = Zhaoqing|last3=Jiang | first3 = Xusheng | year = 2010 | title = Anchor-based programming teaching embedded with Ch platform | pages = 49–52 | url = http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=5552033 | publisher = Mechatronics and Embedded Systems and Applications (MESA), IEEE/ASME International Conference }}</ref><ref>{{cite journal|last1=Furman|first1=B. | last2 = Wertz | first2 = E. | year = 2010 | title = A first course in computer programming for mechanical engineers | pages = 70–75 | url = http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?reload=true&arnumber=5552091 | publisher = Mechatronics and Embedded Systems and Applications (MESA), IEEE/ASME International Conference }}</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 | doi= CNKI: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 | doi= CNKI:SUN:WOLF.0.2009-05-018 }}</ref>
 
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.<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 the design, analysis, and modelling of continuous-time or discrete-time linear time-invariant (LTI) control systems.<ref>{{cite journal |last= Zhu |first= Yong |year= 2003 |title= An Object-Based Software Package for Interactive Control System Design and Analysis |journal= Journal of Computing and Information Science in Engineering |volume= 3 |issue= 4 |pages= 366–367 |doi= 10.1115/1.1630815 |s2cid= 17908643 }}</ref> Both tool kits include the [[source code]].
Ch can also be run as an interactive shell to execute C statement, C script file, Unix commands, and Windows commands (under windows only).<ref>{{cite journal | last = Wang | first = Gary | year = 2002 | title = Ch Solves Portability Headaches | url = http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=1049264 | publisher = IEEE Spectrum}}</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, offering a curriculum for K-12 students.
== Features ==
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|C (programming language)]] with
[[CH supports the 1999 ISO C Standard (C99) and C++]] classes. C99It 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. areThe supported.specification for Widewide characters in Addendum 1 for C90 is also supported.
 
The following [C++]] features are available in ChCH include:
 
* [[Member function]]s
* 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]]
* Class
* privatePrivate/public data and functions in classclasses. 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 functionsfunction]]s
* The [[scope resolution operator ::]]
* The I/O functions cout, cerr, and cin with endl
* Arguments for [[variadic functionsfunction]]s are optional
 
ChCH supports classes in [[C++]] with theadded followingabilities, additional capabilitiesincluding:
 
* Classes inside member functions
* [[Nested functionsfunction]]s with classes
* PassPassing member function to argument of pointer-to-function type of functions
 
ChCH can interfaceinteract with existing C/C++ libraries and call C/C++ functions from ChCH script.<ref>{{cite journalmagazine | last = Wilson | first = Matthew | year = 2004 | title = Open-RJ and Ch | url = http://drdobbs.com/184401877?queryText=ChSDK | publisher magazine= Dr. Dobb's Journal}}</ref>
As a C/C++ interpreter, ChCH can be used as a scripting engine and extension language for your applications. The pointerPointers to arrayarrays or variables can be passed and shared in both binary C space-compiled and chCH scripting spacecontexts. It extends your applicationsOne with a C compatible scripting language. Oneexample of thean embedded chCH scripting application is Mobile-C., Mobile-Cwhich has been used for collaborative visualization of distributed mesh model.<ref>{{cite journalmagazine | last = Cheng | first = Harry | year = 2009 | title = Speeding-Up Software Development Using Embedded Scripting | pages = 8-8 | url = http://drdobbs.com/architecture-and-design/212201774 | publisher magazine= Dr. Dobb's Journal}}</ref><ref>{{cite journalbook |last1=Wang |first1=Li-rong |title=2009 last2IEEE 10th International Conference on Computer-Aided Industrial Design & Conceptual Design |pages=1127–1132 |last2= Bo | first2 = Yo|last3=Hagiwara | first3 = I |publisher= titleComputer-Aided Industrial Design & Conceptual Design, 2009. CAID & CD 2009. IEEE 10th International Conference|doi=10.1109/CAIDCD.2009.5375178 Mobile|year=2009 |isbn=978-C1-4244-5266-8 based|s2cid=39307433 agent}}</ref><ref>{{cite managementbook for|last1=Wang |first1=Li-rong |last2= Bo |first2= Yo|last3=Hagiwara |first3= Ichiro |title= An agent based collaborative visualizationsimplification of distributed3D mesh model |pages=325–328 |url = http://ieeexploredl.ieeeacm.org/search/freesrchabstractcitation.jspcfm?tpid=&arnumber=5375178&queryText%3DMobile-C%26openedRefinements%3D*%26searchField%3DSearch+All1813032 |year=2009 |publisher = Computer-AidedCDVE'09 IndustrialProceedings Designof &the Conceptual6th Design,international 2009.conference CAIDon &cooperative CDdesign, 2009.visualization, IEEEand 10thengineering|isbn=9783642042645 International Conference|series=Cdve'09 }}</ref>
<ref>{{cite journal|last1=Wang|first1=Li-rong | last2 = Bo | first2 = Yo|last3=Hagiwara | first3 = Ichiro | title = An agent based collaborative simplification of 3D mesh model | 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 }}</ref>
 
Ch is a [[C|C (programming language)]] language [[shell (computing)|shell]] and can be used as login shell. ChCH has a built-in [[string type]] (string_t) for automatic memory allocation and de-allocation. It makes C/C++ easy of scripting. It supports shell aliasaliases, history, and piping, etc.<ref>{{cite journal | last = Campbell | first = Matt | year = 2003 | title = Ch, A C/C++ Interpreter -- New possibilities for people who like C and Unix | url = http://www.mactech.com/articles/mactech/Vol.19/19.09/CInterpreter/index.html | publisher = MACTECH, the journal of Apple technology}}</ref><ref>{{cite book|last=Cheng|first=Harry|title=The Ch Language Environment|edition=6.3|year=2010|publisher= SoftIntegration, Inc.|___location=Davis, CA}}</ref>
 
ChCH has built-in 2D/3D graphical plotting features and computational [[array data type|arrayarrays]]s 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>
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>
 
== See also ==
 
* [[CINT]]
* [[Pike (programming language)]]
 
== References ==
 
{{Reflist}}
 
== Further reading ==
* {{cite journal |last=Heller |first=Martin |year=2001 |title=The Ch Language Environment |url=http://www.byte.com/documents/s=1776/byt20011031s0002/1105_heller.html |publisher=[[Byte (magazine)|Byte]] |url-status=dead |archive-url=https://web.archive.org/web/20011116220556/http://www.byte.com/documents/s%3D1776/byt20011031s0002/1105_heller.html |archive-date=November 16, 2001 }}
 
* {{cite journalmagazine | last = HellerCheng | first = MartinHarry | year = 20012002 | title = TheC99 Ch& LanguageNumeric EnvironmentComputing |pages= 28–34 |url = http://replay.waybackmachine.org/20011116220556/http://www.bytedrdobbs.com/documentscpp/s=1776/byt20011031s0002/1105_heller.html184404993 | publisher magazine= ByteDr. Dobb's MagazineJournal}}
* {{cite journalmagazine | last = Cheng | first = Harry | year = 20022006 | title = C99Ch: &A NumericC/C++ Interpreter for Script Computing | pages = 28–346–12 | url = http://drdobbs.com/cpp/184404993184402054 | publisher magazine= Dr. Dobb's Journal}}
* {{cite journalbook | last = Cheng | first = Harry | year = 20062009 | title = Ch: A C/C++ InterpreterFor forEngineers Script& ComputingScientists, |An pagesInterpretive = 6–12Approach | url = http://drdobbshighered.mcgraw-hill.com/184402054sites/0073376051/ | publisher= McGraw-Hill|isbn= Dr. Dobb's Journal978-0-07-729046-7}}
* {{cite book | last = Cheng | first = Harry | year = 20092011 | title = C For Engineers & Scientists, An Interpretive Approach | url = httphttps://higheredwww.mcgraw-hillamazon.comcn/sitesC%E8%AF%AD%E8%A8%80%E7%A8%8B%E5%BA%8F%E8%AE%BE%E8%AE%A1%E6%95%99%E7%A8%8B-%E7%A8%8B%E8%BE%89/0073376051dp/B005JR8IW6/ref=sr_1_1?s=books&ie=UTF8&qid=1325463722&sr=1-1 | publisher = McGraw-HillHigher Education Press|isbn= 978-00772904670-07-729046-7|edition= Chinese }}
* {{cite book | last = Cheng | first = Harry | year = 2011 | title = C For Engineers & Scientists (Chinese Edition) | url = http://www.amazon.cn/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=C%26%2335821%3B%26%2335328%3B%26%2331243%3B%26%2324207%3B%26%2335774%3B%26%2335745%3B%26%2325945%3B%26%2331243%3B%26%2365288%3B%26%2332763%3B%26%2335793%3B%26%2329256%3B%26%2365289%3B+&x=0&y=0/ | publisher = Higher Education Press|isbn= 978-0077290467}}
 
== External links ==
* [http://{{Official website|www.softintegration.com}}, SoftIntegration Home Page]
* [http://www.mobilec.org/ Mobile-C: a Multi-Agent Platform for Mobile C/C++ Agents Home Page]
* [http://c-stem.ucdavis.edu/studio/ C-STEM Studio]
 
{{DEFAULTSORT:Ch Interpreter}}
[[Category:C programming language family]]
[[Category:Educational programming languages]]
[[Category:Interpreters (computing)]]
[[Category:Pedagogic integrated development environments]]
[[Category:Educational programming languages]]
 
[[no:Ch (tolk)]]