mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-22 05:34:59 -07:00
if expression
This commit is contained in:
+6
-3
@@ -12,8 +12,11 @@ import {
|
||||
}
|
||||
|
||||
proc main() {
|
||||
var a, b, c = {
|
||||
give 1, 2, 123*321;
|
||||
var cond = true;
|
||||
var msg = if cond {
|
||||
give "hello";
|
||||
} else {
|
||||
give "goodbye";
|
||||
};
|
||||
fmt.println(a, b, c);
|
||||
fmt.println(msg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user