ch(1)

NAME
ch - an embeddable C/C++ interpreter

SYNTAX
ch [-Sacdfghinruw] [argument...]

DESCRIPTION
Ch language environment is designed to be a superset of C. It contains salient features of many programming languages and programming environments. Ch is interpretive with a quick system response for information integration throughout entire organizations. It can be used for numerical computing, Unix/Windows shell programming, common gateway interface (CGI), internet computing, real-time control of mechatronic systems, and many other applications.

The documentation for Ch is large and not well suited to the 'man' page format. The most updated documentations are available on the Web at http://www.softintegration.com.

OPTIONS

-S  Safe shell. All restrictions of C shell apply to the safe shell. Pointer cannot be used as an lvalue and many built-in functions such as remove(), rename(), unlink(), open(), and fopen() are disabled after execution of $CHHOME/config/chsrc and $CHHOME/config/chslogin in case of login shell.

-a  Portable code. Platform-dependent functions in CHHOME/lib/libopt cannot be used.

-c  Read commands from the first filename argument (which must be present). Remaining arguments are placed in argv or _argv, the argument-list variable, and passed directly to ch.

-d  When ch is started, it first checks if file .chrc exists in user's home directory. If not, Ch will copy $CHHOME/config/.chrc to user's home directory. When chs is started, it first checks if file .chsrc exists in user's home directory. If not, Ch will copy $CHHOME/config/.chsrc to user's home directory. In Windows, startup files _chrc and _chsrc instead of .chrc and .chsrc, will be used for regular Ch and safe Ch, respectively.

-f  Fast start. Read neither the chrc and .chrc files, nor the chlogin and .chlogin files (if a login shell) upon startup.

-g  For CGI script debug. It turns the web browser into text shell.

-h  Display Ch usage message for help.

-i  Reserved for forced interactive shell (ignored).

-n  Parse (interpret), but do not execute commands. This option can be used to check Ch shell scripts for syntax errors. The _warning flag will be set to the highest level. All warning messages will be printed out. Start up files will be parsed only without execution.

-r  Redirect stderr stream to stdout. This option is useful for debugging programs running in Windows operating systems. For example, command

         ch -r chcmd > junkfile will send error messages from stderr stream in program chcmd to file junkfile

-u  Unbuffer the stdout stream mainly for handling I/O in IDE.

-v  Print out Ch edition and version number in the stdout stream.

-w  The _warning flag will be set to the highest level for both parsing and execution of the program. All warning messages will be printed out.

FILES
~/_chrc
    Included by $CHHOME/config/chrc in Windows.
~/_chsrc
    Included by $CHHOME/config/chsrc in Windows.
~/.chrc
    Included by $CHHOME/config/chrc in Unix.
~/.chsrc
    Included by $CHHOME/config/chsrc in Unix.
$CHHOME/config/chrc
    Read at beginning of execution by regular shell.
$CHHOME/config/chsrc
    Read at beginning of execution by safe shell.
$CHHOME/sbin
    With commands accessible by both regular and safe shells.
~/.chlogin
    Included by $CHHOME/config/chlogin
~/.chslogin
    Included by $CHHOME/config/chslogin
$CHHOME/config/chlogin
    Read by login shells after execution of $CHHOME/config/chrc at login for regular shell.
$CHHOME/config/chslogin
    Read by login shells after execution of $CHHOME/config/chsrc at login for safe shell.
~/.chlogout
    Read by login shells at logout.

SEE ALSO
 World Wide Web --- http://www.softintegration.com

AUTHOR
Harry H. Cheng