We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// now if expr { expr } else { expr } expr ? expr : expr // new func name() { } keyword name() { } => keyword () { } <=> if () {} for () {} // c if (expr) expr for (expr) expr fun (params) expr keyword () (expr|'{' expr* '}') // if if (expr) expr else expr // expr ? expr : expr if (expr) { expr } else { expr } // for for (expr) expr for (expr) { expr } // while while () expr // fun fun (params) expr // (parmas) => expr fun (params) { expr } // (parmas) => { expr } // change if (else if) else // else if if expr {} else if expr {} else {} if (expr) expr else ifexpr // == 'if (expr) {} else {}'' // 不需要定义 else if // fun decl let f = fun (params) f() // 因为是 let,所以可以优化成函数声明,可以递归 ==> fun f(params) { return f() } // 等价于上面,可以递归 let mut f2 = fun (params) expr // 不能递归 f2 // 变量定义 | 类型定义 let fn = fun(arr:[int]) for(i in arr) if (i % 2 == 0 ) print(i) let main = fun() expr
The text was updated successfully, but these errors were encountered:
kulics
thomasyonug
diaozhongpu
No branches or pull requests
控制流
The text was updated successfully, but these errors were encountered: