Pascal is an easy to learn, event drive programming language! Developed to learn students good programming techniques!
This tutorial will teach you the absolute basics of Pascal!
Requirements:
A Windows Based Operating System (32bit)
A Compiler, there are plenty available free free pascal compilers - Google Search
Lets get started:
There are a few things you need to remember when coding in Pascal; After each line we put a space to make it easier when debugging for errors and it also just creates and nice overall house style for the code, we also indent IF statements to make it easier to spot and again a better overall house style and feel, remember this! It will help you in later tutorials.
Open your Pascal Editor/Compiler and begin by typing this code
This will define the name to identify your program, you MUST remember to put a ; at the end of every line of code in Pascal!Code:PROGRAM MyFirstApplication;
Here we are going to tell the code to use the Windows Environment when runningCode:USES Wincrt;
This tells pascal we have begun the code for the application!Code:BEGIN
Writeln tells Pascal to write the line within the ('') perimeters’, this will be the text that’s shown in the end programCode:Writeln('Hello This is my first Pascal Application');
Now we will tell the program that its the end of the programming code, there must be a full stop after the last End. in the program, you may use End in an IF statement which will not specify the end of the program code because it has no full stop, we will come back to IF statements in a later tutorial!
The code should now look like this:Code:End.
The end program should look like this:Code:PROGRAM MyFirstApplication; USES Wincrt; BEGIN Writeln('Hello this is my first Pascal application'); END.
![]()
Last edited by Bioshox; 02-02-2010 at 02:03 AM. Reason: delete spam link
It's a nice little tutorial. It's a shame you tried to use it to spamvertise your tutorial site.
I'm sorry about that guy's
I feel the ban was a bit unnecessary, maybe just a warning, as I didn’t realize a link back was against the rules!
Fair enough, it won’t happen again!![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks