For reasons related to work, I will soon begin learning Delphi and Pascal.
Lately I’ve been using Ubuntu more often than my Windows 8.1 OS.
As such, I decided to see if I could compile and run my first Pascal code snippet in Ubuntu.
And well… here’s how to do just that!
Simply run some apt-gets:
The Compiler:
sudo apt-get install fp-compiler
You can now compile text editor based pascal files through Terminal with the command:
fpc file.pas
OR! Why not install a fancy-pants IDE! Just run the following apt-get:
sudo apt-get install fp-ide
Then run the command below in terminal to fire up the pascal IDE:
$fp
Soooooo, it runs in the Terminal. Neat!
Let’s make ourselves a Hello World program, as per tradition of starting any new programming language.
Let’s Compile:
…and Run!
Success!
Welcome to Pascal… on Ubuntu(Linux)