Ch (computer programming): Difference between revisions

Content deleted Content added
Yobot (talk | contribs)
m top: WP:CHECKWIKI error fixes using AWB (11904)
Template:Infobox software update. WP:LINKs: updates, fix-cut WP:NOPIPE. Nonlead-word nonproper noun MOS:CAPS, nonacronym WP:ALLCAPS > low-case. Small WP:EoS WP:COPYEDITs. Template:Official website add.
Line 5:
 
{{Infobox software
| name = =Ch C/C++ Interpreter Chinterpreter
| logo =
| screenshot =
| caption =
| author = Harry H. Cheng
| developer = SoftIntegration, Inc.
| latestreleased release date = {{Start date and age|20152001|1210|0201}}
| latest release version = 7.5.1
| latest release date = {{Start date and age|2015|12|02}}
| status =
| programming language = [[C (programming language)|C]]
| operating system = [[Microsoft Windows|Windows]], [[Mac OS X]], [[Linux]], [[IBM AIX (operating system)|AIX]], [[HP-UX]], [[Solaris (operating system)|Solaris]] (SPARC and X86x86), [[Qnx|QNX]], [[FreeBSD]]
| latest release version = 7.5.1
| platform = [[x86]], [[SPARC]]
| latest release date = {{Start date and age|2015|12|02}}
| releasedsize = {{ Start date | Oct 01, 2001= }}
| operating system = [[Microsoft Windows]], [[Mac OS X]], [[Linux]], [[AIX (operating system)|AIX]], [[HP-UX]], [[Solaris (operating system)|Solaris]] (SPARC and X86), [[Qnx|QNX]], [[FreeBSD]]
| language = English
| genre = [[Integrated development environment]]
| license = [[Proprietary software]]<br/>'''Standard edition:''' [[Freewarefreeware]]<br />'''Student edition:''' [[Freewarefreeware]] for Studentsstudents<br />'''Professional edition:''' [[Trialwaretrialware]] for 30 days
| website = {{urlURL|http://www.softintegration.com}}
}}
 
'''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, originally designed by Harry H. Cheng as a scripting language for beginners to learn mathematics, computing, [[numericnumerical methodanalysis]]s (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 into thein C/C++ application programs.
It has numerical computing and graphical plotting features. Ch is a combined 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 and 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 | url = http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=1049264 | publisher = IEEE Spectrum}}</ref>
 
Ch is written in C and runs underon [[Microsoft Windows|Windows]], [[Linux]], [[Mac OS X]], [[FreeBSD]], [[IBM AIX|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, and [[variable-length array]] 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 | journal = Computer Standards & Interfaces | volume = 17 | issue = 4}}</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= 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>
 
Ch has many toolkits that extendedextend 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.<ref>{{cite journal | last = Cheng | first = Harry | year = 2006 | title = Object-Oriented Interactive Mechanism Design and Analysis | pages = 237–246 | url = http://link.springer.com/article/10.1007%2Fs00366-005-0008-4 | publisher = Engineering with Computers}}</ref> Ch Control System Toolkit is used for modeling, design, and analysis 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 | pages = 366–367 | url = http://computingengineering.asmedigitalcollection.asme.org/article.aspx?articleid=1399866f | publisher = ASME Trans. Journal of Computing and Information Science in Engineering}}</ref> Both toolkits includes the source code.
 
Ch is now used and integrated into curriculum by many universities and high schools forand universities to learningteach 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 | journal = Computing in Science & Engineering | volume = 12 | issue = 4 | page = 7}}</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=ZHUANGZhuang |first1=Hong | last2 = WANGWang | 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={{CNKI|CKNI:SUN:JYJS.0.2009-07-016}}}}</ref><ref>{{cite journal |last1=WANGWang |first1=RONG|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={{CNKI|CNKI:SUN:WOLF.0.2009-05-018}} }}</ref><ref>{{cite journal |last1=Stopforth |first1=Riaan | year = 2013 | title = Teaching and programming with Ch for tertiary-level mechatronics engineering education | pages = 146–149 | url = http://ieeexplore.ieee.org/xpl/articleDetails.jsp?reload=true&arnumber=6685507&punumber%3D6678934%26sortType%3Dasc_p_Sequence%26filter%3DAND%28p_IS_Number%3A6685470%29%26pageNumber%3D2 | publisher = Robotics and Mechatronics Conference (RobMech) }}</ref>
 
== Features ==
Line 37 ⟶ 41:
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 include:
 
* Member functions
Line 55 ⟶ 59:
* Arguments for variadic functions are optional
 
Ch supports classes in C++ with theadded followingabilities, additional capabilitiesincluding:
 
* Classes inside member functions
Line 61 ⟶ 65:
* 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.<ref>{{cite journal | last = Wilson | first = Matthew | year = 2004 | title = Open-RJ and Ch | url = http://drdobbs.com/184401877?queryText=ChSDK | publisher = Dr. Dobb's Journal}}</ref>
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 journal | 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 = Dr. Dobb's Journal}}</ref><ref>{{cite journal |last1=Wang |first1=Li-rong | last2 = Bo | first2 = Yo|last3=Hagiwara | first3 = I | title = Mobile-C based agent management for collaborative visualization of distributed mesh model | url = http://ieeexplore.ieee.org/search/freesrchabstract.jsp?tp=&arnumber=5375178&queryText%3DMobile-C%26openedRefinements%3D*%26searchField%3DSearch+All | publisher = Computer-Aided Industrial Design & Conceptual Design, 2009. CAID & CD 2009. IEEE 10th International Conference }}</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 has a built-in string type (string_t) for automatic memory allocation and de-allocation. It supports shell aliases, history, 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>
 
Ch 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>
 
== See also ==
Line 80 ⟶ 84:
== Further reading ==
 
* {{cite journal | last = Heller | first = Martin | year = 2001 | title = The Ch Language Environment | url = http://replay.waybackmachine.org/20011116220556/http://www.byte.com/documents/s=1776/byt20011031s0002/1105_heller.html | publisher = [[Byte Magazine(magazine)|Byte]]}}
*{{cite journal | last = Cheng | first = Harry | year = 2002 | title = C99 & Numeric Computing | pages = 28–34 | url = http://drdobbs.com/cpp/184404993 | publisher = Dr. Dobb's Journal}}
* {{cite journal | last = Cheng | first = Harry | year = 2006 | title = Ch: A C/C++ Interpreter for Script Computing | pages = 6–12 | url = http://drdobbs.com/184402054 | publisher = Dr. Dobb's Journal}}
* {{cite book | last = Cheng | first = Harry | year = 2009 | title = C For Engineers & Scientists, An Interpretive Approach | url = http://highered.mcgraw-hill.com/sites/0073376051/ | publisher = McGraw-Hill|isbn= 978-0-07-729046-7}}
* {{cite book | last = Cheng | first = Harry | year = 2011 | title = C For Engineers & Scientists (Chinese Editionedition) | url = http://www.amazon.cn/C%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/dp/B005JR8IW6/ref=sr_1_1?s=books&ie=UTF8&qid=1325463722&sr=1-1 | publisher = Higher Education Press|isbn= 978-0-07-729046-7}}
 
== 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]