Ch (computer programming): Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 1:
Ch, pronounced as C H, is an embeddable C/C++ interpreter. Ch is designed for using one C compatible language for all programming tasks. Ch programming language can run in Windows, Linux, Solaris, HP-UX, Mac OS X, FreeBSD and QNX.
 
ItCh programming language extends [[C programming language|C]] and [[C plus plus|C++]] for scripting capability, numerical computing and cross platform 2D/3D plottings and embedded scripting. It can run in Windows, Linux x86, Linux PPC, Solaris, HP-UX, Mac OS X, FreeBSD and QNX.
 
== Features ==
Line 12:
 
=== Embeddable scripting ===
As a C/C++ interpreter, itCh iscan be used as a nicescripting fitengine asfor anyour embeddedapplications. It extends your applications with C compatible scripting enginelanguage.
for C/C++ applications.
 
=== Shell programming and cross-platform scripting ===
Line 37 ⟶ 36:
#include <stdio.h>
int main() {
printf("Hello world!\n");
}
 
Note: <nowiki>#</nowiki>!/bin/ch is optional.
 
=== Numerical computing in Ch ===
 
 
<nowiki>#</nowiki>include <stdio.h>
<nowiki>#</nowiki>include <array.h>
int main() {
array double A[2][3] = {1, 2, 3,
4, 5, 6};
array double B[3][2];
printf("A= \n%f \n", A+A);
B = 2*transpose(A);
printf("B= \n%f \n", B);
}
 
The output is:
 
A=
2.000000 4.000000 6.000000
8.000000 10.000000 12.000000
B=
2.000000 8.000000
4.000000 10.000000
6.000000 12.000000
 
 
=== 2D/3D plotting in Ch ===