variants bool



variants_bool
Smart pascal source code
const ctrue = True; const cfalse: Boolean = False; var vtrue = not cfalse; var vfalse: Boolean = not vtrue; var v: Variant; v := True; WriteLn(not v); v := not v; WriteLn(not v); v := cfalse; WriteLn(v or vtrue); WriteLn(vfalse or v); if v then WriteLn('Bug 1'); v := v xor ctrue; WriteLn(v or vtrue); WriteLn(vfalse or v); WriteLn(v and vtrue); WriteLn(vfalse and v); if v then else WriteLn('Bug 2'); while v do repeat Exit; until v; {<<< RESULT - CONSOLE LOG >>> ----------------------------- False True True False True True True False ----------------------------- {<<<<<<<<< THE END >>>>>>>>>}