Merge pull request #13 from viniciusfdasilva/dev

01-01-2024 - First Pull Request of the year 🤪🙃😝
This commit is contained in:
Vinicius Silva 2024-01-01 22:30:48 -03:00 committed by GitHub
commit 0300678fbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 36 additions and 0 deletions

36
15_enums/main.v Normal file
View File

@ -0,0 +1,36 @@
enum Color as u8{
@none
red
green
blue
}
pub fn main(){
mut color := Color.red
color = .green
mut color1 := Color.@none
println(color)
match color {
.red {
println('the color was red')
}
.green {
println('the color was green')
}
.blue {
println('the color was blue')
}
else {
println('color was not indentified')
}
}
println(color1)
}