...
This commit is contained in:
@@ -1,7 +1,29 @@
|
||||
module main
|
||||
|
||||
struct Human {
|
||||
name: string
|
||||
age: i32
|
||||
}
|
||||
|
||||
enum Message {
|
||||
Quit
|
||||
Say: string
|
||||
}
|
||||
|
||||
func main(): i32 {
|
||||
core::println("Hello, world!")
|
||||
core::println("Hello" + "World")
|
||||
|
||||
let message: Message = new Message::Say "test"
|
||||
|
||||
match message {
|
||||
Quit {
|
||||
core::println("quit")
|
||||
}
|
||||
Say message {
|
||||
core::println(message)
|
||||
}
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
Reference in New Issue
Block a user