Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
18
Task/Logical-operations/ECL/logical-operations.ecl
Normal file
18
Task/Logical-operations/ECL/logical-operations.ecl
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
LogicalOperations(BOOLEAN A,BOOLEAN B) := FUNCTION
|
||||
ANDit := A AND B;
|
||||
ORit := A OR B;
|
||||
NOTA := NOT A;
|
||||
XORit := (A OR B) AND NOT (A AND B);
|
||||
DS := DATASET([{A,B,'A AND B is:',ANDit},
|
||||
{A,B,'A OR B is:',ORit},
|
||||
{A,B,'NOT A is:',NOTA},
|
||||
{A,B,'A XOR B is:',XORit}],
|
||||
{BOOLEAN AVal,BOOLEAN BVal,STRING11 valuetype,BOOLEAN val});
|
||||
RETURN DS;
|
||||
END;
|
||||
|
||||
LogicalOperations(FALSE,FALSE);
|
||||
LogicalOperations(FALSE,TRUE);
|
||||
LogicalOperations(TRUE,FALSE);
|
||||
LogicalOperations(TRUE,TRUE);
|
||||
LogicalOperations(1>2,1=1); //Boolean expressions are also valid here
|
||||
Loading…
Add table
Add a link
Reference in a new issue