To use this tutorial, you need to be running a version of Ubuntu and have FreePascal IDE for Linux i386, with compiler version 2.4.0-2 installed. The latest version of FreePascal IDE and the compiler can be found in the Ubuntu Software Center. This should work with any of the later versions of Ubuntu, though I have only tested this with version 10.04 Lucid Lynx.
1. Click on Applications to open the main menu. Highlight Accessories to open an adjacent menu and click on Terminal. When the Terminal opens type 'fp' then press enter. The FreePascal IDE should display in the Terminal (see picture).
2. Click "File" on the FreePascal IDE's menu bar and click "New" from the drop down menu. If you can't click on the menu, you can activate the menu by pressing Alt + the first letter of the menu item you want to access, then use the arrow keys to navigate the drop down menus. (If you already have a program written, you can open the file instead.)
3. You should now see the text editor inside the Terminal. Type your Pascal program, in the editor. Below is a simple program that outputs "Greetings! This is a sentence!" in the Terminal.
program howdy;
begin
writeln('Greetings! This is a sentence!');
readln;
end.
If your program has any errors, the debugger will most likely be able to identify them for you.
4. Now save the file by clicking on "File" from the menu again and click on "Save as..." or just press F2. A window will pop up inside the Terminal giving you the option to specify a name and location for the file. In this tutorial I chose to name the file "test.pas" and saved it in my Documents folder. Name the file and save it wherever you like.
5. Click on "Run" on the menu and click "Run" from the drop down that appears, or press Ctrl + F9. FreePascal IDE will automatically compile the program for you within seconds and begin executing it.
6. Your program should have been compiled and should be running in the Terminal window.
Your program will run and when the program stops, the Terminal will return you to the FreePascal IDE. You can exit the FreePascal IDE by simply clicking on "File" and "Exit", or by pressing Alt + x. When you exit, you will be returned to the Terminal.
To learn how to program in Pascal, I recommend the following website: http://www.learn-programming.za.net/programming_pascal_learn01.html. The tutorial is very easy to follow as the author explains the basics.
If you would like to learn more about the free Pascal compiler and IDE, please visit http://www.freepascal.org/.
Published by Michelle Rogers
RETURN of the KINGOnce upon a time in Naples Maradona made
Neapolitans dreams come true. In 2005 he
returned and the city exploded with joy!- The Effect of the Environment on Eurosta Solidagins Oviposition and Larva's SurvivalThe effect of the environment on Eurosta solidagins oviposition and larva's survival,
More Than Cheap Flights: Save Money when Flying and Using the AirportWhen you're living on a budget and still wanting or needing to travel, you can do far more to save money than just find a cheap flight. Here is some advice on saving money at (a...- Cruising on the Carnival Victory Western CaribbeanCruising the Western Carribbean on the Carnival Victory 7 days visiting Grand Caymen, Cozumel, Mexico, and Ocho Rios, Jamaica
- An Alternative Investment--The USOAn investment that really pays off.
- The Terminal: A Decent Romcom
- Using Bittorrent to Download: How to Use Bittorrent, the File Sharing Client
- How to Change the Owner Information in Microsoft Windows
- How to Avoid the "Mailbox is Over Its Size Limit" Error in Outlook 2003
- How to Monitor Changes to the Windows Vista Registry
- Sniffing the Network with Wireshark / Ethereal Packet Sniffer
- Review of Royal Caribbean's Cruise with the Navigator of the Seas





1 Comments
Post a CommentIf you don't want to add the program as a repository, you can just run it by the shell typing:
./name_of_program