checked

所属分类:编程语言基础
开发工具:Swift
文件大小:0KB
下载次数:0
上传日期:2024-03-21 21:38:22
上 传 者sh-1993
说明:  一种非常简单的编程语言。
(A dead simple programming language.)

文件列表:
.swiftpm/xcode/xcshareddata/xcschemes/
Sources/
samples/
LICENSE
Package.swift

# checked Checked is a dead simple programming language. ### Variable declarations with type inference ``` func main() { let constantVariable = 5 var variable = 1 } ``` ### If-statements ``` func main() { let value = false if value { } else { } } ``` ### Functions ``` func myFunction(value: Float) { } ``` ### Functions with anonymous parameters ``` func myFunction(_ value: Float) { } ``` ### If-assignments ``` func myFunction(_ value: Bool) -> String { let result = if value { "string" } else { "other string" } return result } ``` ### If-returns ``` func myFunction(_ value: Bool) -> String { return if value { "string" } else { "other string" } } ``` ### Complex type inference ``` func myFunction() -> Int64 { return 0 } func main() { let variable = myFunction() } ``` ## Getting started Check out the samples. ``` swift run checked build samples/function-call/main.checked ```

近期下载者

相关文件


收藏者