资 源 简 介
Cpy - A C-like scripting language
Cpy is the real general purposed dynamic c-like syntax scripting language in the 21st century.
Cpy provides you a way to write Python codes in C syntax!
Download & Install
Hello World!
```
// file: hello.cpy
printf("Hello World!
");
$ cpy hello.cpy
Hello World!
$
```
Reading from stdin
```
// file: stdin.cpy
print "input "q" to quit:";
while(true){
printf("> ");
line = stdin.readline();
line = line.strip().lower();
if(line == "q"){
print "bye.";
break;
}else{
print "your input:", repr(line);
}
}
```
classes and functions
```
class A{
public a = 0;
public static s = 1;
function init(a){
this.a = a;
print "A init", a;
}
function f(a, b=1){
return a + b;
}
}
<