Data update

This commit is contained in:
Ingy döt Net 2026-02-01 16:33:20 -08:00
parent 5150844a7d
commit 4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions

View file

@ -1,7 +0,0 @@
procedure Print_Logic(A : Boolean; B : Boolean) is
begin
Put_Line("A and B is " & Boolean'Image(A and B));
Put_Line("A or B is " & Boolean'Image(A or B));
Put_Line("A xor B is " & Boolean'Image(A xor B));
Put_Line("not A is " & Boolean'Image(not A));
end Print_Logic;

View file

@ -1,26 +0,0 @@
IDENTIFICATION DIVISION.
PROGRAM-ID. print-logic.
DATA DIVISION.
LOCAL-STORAGE SECTION.
01 result PIC 1 USAGE BIT.
LINKAGE SECTION.
01 a PIC 1 USAGE BIT.
01 b PIC 1 USAGE BIT.
PROCEDURE DIVISION USING a, b.
COMPUTE result = a B-AND b
DISPLAY "a and b is " result
COMPUTE result = a B-OR b
DISPLAY "a or b is " result
COMPUTE result = B-NOT a
DISPLAY "Not a is " result
COMPUTE result = a B-XOR b
DISPLAY "a exclusive-or b is " result
GOBACK
.

View file

@ -1,12 +1,12 @@
import extensions;
public program()
public Program()
{
bool a := true;
bool b := false;
console.printLine("a and b is ", a && b);
console.printLine("a or b is ", a || b);
console.printLine("Not a is ", a.Inverted);
console.printLine("a xor b is ", a ^^ b)
Console.printLine("a and b is ", a && b);
Console.printLine("a or b is ", a || b);
Console.printLine("Not a is ", a.Inverted);
Console.printLine("a xor b is ", a ^^ b)
}

View file

@ -1,6 +0,0 @@
procedure print_logic(integer a, integer b)
printf(1,"a and b is %d\n", a and b)
printf(1,"a or b is %d\n", a or b)
printf(1,"a xor b is %d\n", a xor b)
printf(1,"not a is %d\n", not a)
end procedure

View file

@ -18,7 +18,7 @@ val test = fn(a, b) {
"{{a}} nxor? {{b}}: {{a nxor? b}}",
"\n",
],
by="\n")
delim="\n")
}
val tests = [

View file

@ -1,7 +0,0 @@
function Test-Boolean ([bool] $a, [bool] $b) {
Write-Host "A and B: " ($a -and $b)
Write-Host "A or B: " ($a -or $b)
Write-Host "not A: " (-not $a)
Write-Host "not A: " (!$a)
Write-Host "A xor B: " ($a -xor $b)
}

View file

@ -1,13 +0,0 @@
logics: func [a [logic!] b [logic!]] [
print ['and tab a and b]
print ['or tab a or b]
print ['not tab not a]
print ['xor tab a xor b]
print ['and~ tab and~ a b]
print ['or~ tab or~ a b]
print ['xor~ tab xor~ a b]
print ['any tab any [a b]]
print ['all tab all [a b]]
]

View file

@ -1,15 +0,0 @@
let logic = (a, b) => {
Js.log(string_of_bool(a) ++ " and " ++ string_of_bool(b) ++ " = " ++ string_of_bool(a && b))
Js.log(string_of_bool(a) ++ " or " ++ string_of_bool(b) ++ " = " ++ string_of_bool(a || b))
}
let logic2 = (a) =>
Js.log("not(" ++ string_of_bool(a) ++ ") = " ++ string_of_bool(!a))
logic(true, true)
logic(true, false)
logic(false, true)
logic(false, false)
logic2(true)
logic2(false)