Site hosted by Angelfire.com: Build your free website today!

Matt's Programming Page

Hello!

animated button

"HELLO WORLD"

Pascal tutorial #1: By Matt Miller

God, I'm sure any newcomers to Pascal will recognize this immediately. The standard and played out "Hello World" tutorial. As much as it is used, it is most necessary to fully grasp many fundamentals of this program. Now allow myself to introduce...myself. My name is Matt Miller, a student attending a high school somewhere in the known world. In my freshmen year, I took a Pascal class- hardly seemed par in teaching the basics, so I researched and taught myself. Same with QBasic, which I stumbled upon while using my laptop I purchased at a yard sale. I am currently teaching myself more C++ than anything right now.

Anyway, let's begin. Pascal is a procedural programming language. This means computer programs revolve around procedural subroutines in Pascal. It is not very object-oriented, like in C++ and C, Java, etc., however it is a necessary learning language to begin with. It is very similiar to Delphi.

These tutorials require Dev Pascal. Dev-Pascal is a full-featured integrated development environment (IDE), which is able to create Windows or console-based Pascal programs using the Free Pascal or GNU Pascal compilers.Windows 95/98/NT/2000/XP

You may download Dev Pascal, C++ at www.bloodshed.net.

When inside Dev Pascal, create a new program. *NOTE* This tutorial is not on how to fully open and create Dev Pascal source code projects. In this new program, you will type the following code:

program hello_world(input, output);

begin

writeln("Hello world");

readln;

end.

Boom. Just like that, you have your first computer program written. Head to compile and a MS-DOS screen should appear with the following output:

Hello world

So what does all this code mean? Well, most of this code is necessary and is the structural procedure in every Pascal program. Let's analyze:

program hello_world(input,output);

The word program is part of the program header in Pascal.