Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Boolean-values/Ecstasy/boolean-values.ecstasy
Normal file
18
Task/Boolean-values/Ecstasy/boolean-values.ecstasy
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
module GeorgeBoole {
|
||||
@Inject Console console;
|
||||
|
||||
void run() {
|
||||
Boolean f = False;
|
||||
assert !f == True;
|
||||
|
||||
// methods like "and", "or", "xor", and "not" are the same as
|
||||
// the operators "&"/"&&", "|"/"||", "^"/"^^", and the unary "~"
|
||||
assert True.and(False) == True & False == False;
|
||||
assert True.or(False) == True | False == True;
|
||||
assert True.xor(False) == True ^ False == True;
|
||||
assert True.not() == ~True == False;
|
||||
|
||||
console.print($"0==1 = {0==1}");
|
||||
console.print($"!False = {!False}");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue