16 lines
319 B
Text
16 lines
319 B
Text
[indent=4]
|
|
/*
|
|
Logical operations in Genie
|
|
valac logicals.gs
|
|
./logicals true false
|
|
*/
|
|
|
|
def logicals(a:bool, b:bool)
|
|
print @"$a and $b is $(a and b)"
|
|
print @"$a or $b is $(a or b)"
|
|
print @"not $a is $(not a)"
|
|
|
|
init
|
|
a:bool = bool.parse(args[1])
|
|
b:bool = bool.parse(args[2])
|
|
logicals(a, b)
|