program project1;
{$mode objfpc}{$H+}
{$APPTYPE CONSOLE}
uses
{$IFDEF WINDOWS}
Windows, {for setconsoleoutputcp}
{$ENDIF}
Classes;
const
// ANSI table drawing chars
tdTopLeft = #27'(0l'#27'(B'; // ┌
tdTopCenter = #27'(0w'#27'(B'; // ┬
tdTopRight = #27'(0k'#27'(B'; // ┐
tdMidLeft = #27'(0t'#27'(B'; // ├
tdMidCenter = #27'(0n'#27'(B'; // ┼
tdMidRight = #27'(0u'#27'(B'; // ┤
tdBottomLeft = #27'(0m'#27'(B'; // └
tdBottomCenter = #27'(0v'#27'(B'; // ┴
tdBottomRight = #27'(0j'#27'(B'; // ┘
tdHorzLine = #27'(0q'#27'(B'; // ─
tdVertLine = #27'(0x'#27'(B'; // │
var
i: byte;
s: string;
ch: Char;
begin
{$IFDEF WINDOWS}
SetConsoleOutputCP(CP_UTF8);
{$ENDIF}
// thanks wp, https://f...content-available-to-author-only...l.org/index.php/topic,36945.msg246843.html#msg246843
WriteLn('┌──────────────────────┐');
WriteLn('│ Text in a box │');
WriteLn('╘══════════════════════╛');
WriteLn;
i := 0;
for ch := #32 to #255 do begin
Write(ch, ' ');
inc(i);
if i mod 16 = 0 then WriteLn;
end;
WriteLn;
WriteLn(' 1 ');
WriteLn(' ⌠ ');
WriteLn(' │ 2 x dx = 1');
WriteLn(' ⌡ ');
WriteLn(' 0 ');
WriteLn;
WriteLn(' __');
WriteLn('√ 2 = ', sqrt(2));
WriteLn;
// thanks wp, https://f...content-available-to-author-only...l.org/index.php/topic,38910.msg265726.html#msg265726
// Use Unicode range "Box Drawing" in Lazarus' character map
WriteLn('┏━━┓ ┏━━┓');
WriteLn('┛ ┗━━┛ ┗');
WriteLn;
// Thanks Mr Bee aka @pak_lebah, from ansicrt.pas unit
for i:= 1 to 10 do s:= s + tdHorzLine;
WriteLn(tdTopLeft + s + tdTopRight);
ReadLn;
end.