Smart pascal source code
var t = True;
var f = not t;
function Oopsie: Boolean;
begin
WriteLn('Oops');
Result := False;
end;
function Ookie: Boolean;
begin
WriteLn('Ookie');
exit True;
end;
WriteLn(t implies t);
WriteLn(t implies f);
WriteLn(f implies t);
WriteLn(f implies f);
if (f implies Oopsie) then
WriteLn('Ok')
else
WriteLn('Bug');
if (t implies Ookie) then
WriteLn('Ok')
else
WriteLn('Bug');
{<<< RESULT - CONSOLE LOG >>>
-----------------------------
True
False
True
True
Ok
Ookie
Ok
-----------------------------
{<<<<<<<<< THE END >>>>>>>>>}
function WriteLn(value) {
if (window.console) { window.console.log(value); } };
function Oopsie() {
var Result = false;
WriteLn("Oops");
Result = false;
return Result
};
function Ookie() {
var Result = false;
WriteLn("Ookie");
return true;
return Result
};
var t = false,
f = false;
/* <<< main JS >>> */
t = true;
f = !t;
WriteLn((!t || t));
WriteLn((!t || f));
WriteLn((!f || t));
WriteLn((!f || f));
if ((!f || Oopsie())) {
WriteLn("Ok");
} else {
WriteLn("Bug");
}
if ((!t || Ookie())) {
WriteLn("Ok");
} else {
WriteLn("Bug");
}