Pascal
Free Pascal
Installation
Ubuntu
apt install fpc
AlmaLinux
dnf install fpc
Arch Linux
pacman -S fpc
Binary
# Download fpc-{version}.{arch}-linux.tar from https://www.freepascal.org/
tar xf fpc-{version}.{arch}-linux.tar
cd fpc-{version}.{arch}-linux
./install.sh
Examples
Fibonacci Numbers
uses sysutils;
function fib(n:longint): longint;
begin
if (n < 2) then
fib := n
else
fib := fib(n - 2) + fib(n - 1);
end;
var
n : integer;
begin
n := StrToInt(ParamStr(1));
writeln(fib(n));
end.
(*
example
compile(Free Pascal Compiler):
fpc -O4 -Tlinux fib_pascal.pas
*)