350 likes | 535 Views
Hello World Pascal Tutorial. Nova Southeastern University Cristal Ber ó n-Locke. Obtaining the Software. Object Pascal is included on the disk that comes with Learn Pascal with Delphi , written by Warren Rachele. The book can be purchased for $49.95 from www.barnesandnoble.com .
E N D
Hello WorldPascal Tutorial Nova Southeastern University Cristal Berón-Locke C. Locke
Obtaining the Software • Object Pascal is included on the disk that comes with Learn Pascal with Delphi, written by Warren Rachele. • The book can be purchased for $49.95 from www.barnesandnoble.com. (ISBN 1-55622-719-1) C. Locke
Before you begin to install, make sure that you exit all windows programs that are currently running. C. Locke
Installing the Software • Place the disk into the CD-Rom drive (in many cases it is the D drive, however this may vary depending on the computer you are using). • Sometimes the program will begin the installation process on its own. If this happens, skip steps 3, 4, & 5. Instead, go to step 6. C. Locke
Double click on the Object Pascal icon, which should be the same icon as your CD-ROM drive. C. Locke
Double click on install.exe. C. Locke
A blue screen will appear and on the left side there will be a message telling you to select a product to install. C. Locke
Read the Software License Agreement and click on Yes to continue. C. Locke
Click on Next to continue. C. Locke
After Object Pascal has been installed, restart your computer. • Choose the Typical installation and then click Next. C. Locke
Starting the Program • Click on the Start button on the lower left hand side of your screen. • Go to Programs, then to Delphi, and finally click on Delphi 5. C. Locke
The program will begin and a screen will appear like the one below. C. Locke
Building a Template • Click on the x on the upper right hand corner of the Form 1 window. C. Locke
Close the Unit1.pas screen by clicking on the x in the upper right hand corner of the window. • When asked if you want to save the changes made, click no. C. Locke
Select Project from the Delphi 1 window and then View Source. C. Locke
A window will appear titled project project1.dpr. Delete all of the text in that window and type the following. program template; begin end. C. Locke
Click on File and then Save Project As from the menu at the top of the screen. C. Locke
Name the file template and leave the extension as .dpr. C. Locke
Click on the tab called Linker. • Click on the square that says Generate console application. • Click on OK. C. Locke
Click on Project and then Add to Repository from the menu at the top of the screen. C. Locke
Type in under Title: Console Application • Type under Description: Template for console application • Type under Page: Projects • Type under Author: Your Name C. Locke
Now in order to confirm that all of the steps have been performed successfully, click on File and then Close All from the menu. • Select yes to save changes. C. Locke
Click on the tab named Projects, click on Console Applications, and then click OK. • You are now ready to begin programming! • Click on File and then New from the menu to bring up the New Items window. C. Locke
Hello World Program • Type the following into your template window: program helloworld; begin writeln (‘Hello World!’); writeln (‘This is my first Pascal program.’); readln; end. C. Locke
Click on Run and then Run from the menu at the top of the screen. C. Locke
Your first program will run on a DOS based screen. • In order to exit the program, hit any key. C. Locke
Saving Your Program After all of that work, I have to assume you want to save your work of art! Saving your work is important so that you will not have to start over when you return. C. Locke
Click on File and then Save Project As from the menu at the top of the screen. C. Locke
A small Save As screen will open. It is waiting for further instructions on what you want to name your design. Type helloworld in the File name: box. C. Locke
Learn More Delphi Object Pascal has a built in Quick Start Tutorial that can be accessed from the Help drop down menu at the top of the screen. The tutorial is easy to follow and will guide you on how to create more programs. It will also give you a few more commands that you can try on in your own programs. C. Locke
Contact Information Cristal Locke can be contacted through e-mail at beroncn@nova.edu or through http://tucker.dade.k12.fl.us/classrooms/Locke/gifted.htm This tutorial was created on February 10, 2002. C. Locke
More Important Have fun trying new programs. More codes can be found and downloaded at: http://www.dickmann.org/ http://www.negifreebee.com/nfbfprg.html Maybe one day I will be purchasing one of your home-made programs! C. Locke