Ch是一个可跨平台的C/C++解释器,利用Ch,C/C++程序无需编译就可以直接在多平台的Ch上运行。Ch支持脚本、Shell、2D/3D绘图以及科学计算。它实现了一种语言、到处运行的解决方案。关于Ch的更多信息,请访问
CH简单使用及技巧
NOTE: Please remove existing Ch and its toolkits/packages first, if
you have. Ch Standard Edition and Professional Evaluation cannot be
both installed to the same machine.
Tips for Using Ch
- If it is the first time to run Ch. run ch -d
to create a Ch startup configuration file in your home directory. To get started, type help at the Ch shell prompt.
If you don't want to use Ch in a command shell, please try Ch
(Integrated Development Environment) from SoftIntegration partners. Ch
IDE allows you to edit and execute C/Ch/C++ programs, and display the
output within the same Graphical User Interface.
- In the Ch shell, you can simply type the C/Ch file name to run
your program (you need to run "chmod +x file_name.c" first in Unix,
Mac) If you have multiple files for a program, click to see how to run the program without Makefile:
- Ch supports .
Unix commands such as awk and sed can be used inside Ch scripts as in
Perl, Bash, or csh. Ch built-in string type string_t and foreach-loop
are especially useful for shell programming. Below is an example: string_t token, str="dir1 dir2 dir3";
foreach(token; str) {
mkdir $token
}
- Ch supports such as opendir() and readdir() for cross platform directory and file handling.
- A better calculator for quick calculations, easy to check if there is typo for the input number. For example: C:/> 23+344+23.02+343
733.0200
C:/> 733.02/4
183.2550
C:/>
- Like in Unix, a command in Windows can be executed in the
background by appending "&" at the end of the command. For example,
c:/> notepad &
- To turn on debug for running CGI in Ch, add "-g" flag, the first line for your Ch CGI script file will become
#!/bin/ch -g
- Ch demos contain code for C90, C99, C++ and other features. Click for more.
- Numerical computing and 2D/3D graphical plotting functions are available in .
- Web-based graphical plotting, numerical analysis, mechanism
design and analysis, and control system design and analysis can be
found
- There are two ways to build functions used by Ch.
- To build functions used in Ch shell, you can put your function
files in a directory and set your _fpath to include this directory. You
can check sample ~/.chrc file which can get by running ch -d
- To call your functions in static/dynamic libraries, check our
- To access Ch file functions or variables from Ch shell command line, please visit .
and .
- To embed Ch into your applications as a script engine, check our
- We provide cross platform .
It can be compiled by your desired compiler. These graphical library
functions have the same APIs in Ch Professional Edition. They also can
run in Ch Professional Edition without compilation.
- For statistic analaysis, please check our .
- If you are an experienced C/C++ user, you may only need to
read Appendices B and C in Ch User's Guide with comparison to C and
C++, plus Chapters 23 and 24 for 2D/3D plotting and numerical analysis
available in Ch Professional Edition. Chapters 1, 2, 3, and 4 will be
useful to getting started to use Unix shell.
阅读(1730) | 评论(0) | 转发(0) |