http://labs.cybozu.co.jp/blog/kazuhoatwork/2006/01/c.php
正式名稱是
C - a pseudo-interpreter of the C programming language
C, the pseudo-interpreter, has several advantages over other
scripting languages, such as perl.
very fast (100x faster than perl when calculating fib(40))
easy handling of binary data
good for testing system calls and C APIs
To install,copy the downloaded file to /usr/bin, and chmod 755.
Below are some examples.
% C -e 'printf("hello world\n")'
hello world
% C -cO3 -e 'int fib(int i) { return i > 2 ? fib(i-1) + fib(i-2) :
1; } printf("%d\n", fib(40))'
102334155
% C -e 'int t, sum = 0; while (fread(&t, sizeof(int), 1, stdin) ==
1) sum += t;printf("%d", sum)' < data
31289
% cat hello.C
#! /usr/bin/C
printf("hello world\n");
% ./hello.C
hello world
真是太強大了...orz|||
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.136.187.193