http://www.cnblogs.com/mdnx/archive/2012/09/04/2671060.html using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { /* 先来了解一下什么是实参, 什么是形参. 所谓形参其实也就是说函数定义的时候所带的参数. 比如 static
/* #include<stdio.h> int is_prime(int n) { for(int i = 2; i <= n/2; i ++) if(n % 2 == 0) return 0; return 1; } int main() { int n; printf("Enter a number(exit when n<=1):"); scanf("%d", &n); if(is_prime(n) && n
... ..< func a(inout a) //by ref use &xx Parameters passed to functions are constants by default, which means they can't be modified. func incrementAndPrint(var value: Int) { //var 可修改,传值 value++ print(value)} Closure var multiplyClosure: (In