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.
== Features ==
Line 12:
=== Embeddable scripting ===
As a C/C++ interpreter,
=== 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 ===
|