Jump to content

Developing your first Pascal application!

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
Bioshox

Bioshox

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 207 posts
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

PROGRAM MyFirstApplication;

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!

USES Wincrt;

Here we are going to tell the code to use the Windows Environment when running

BEGIN

This tells pascal we have begun the code for the application!

Writeln('Hello This is my first Pascal Application');

Writeln tells Pascal to write the line within the ('') perimeters’, this will be the text that’s shown in the end program

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!

End.

The code should now look like this:

PROGRAM MyFirstApplication;


USES Wincrt;


BEGIN


Writeln('Hello this is my first Pascal application');


END.

The end program should look like this:

http://sparkfusion.i...9/12/pascal.bmp

Edited by Bioshox, 02 February 2010 - 02:03 AM.
delete spam link


#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
It's a nice little tutorial. It's a shame you tried to use it to spamvertise your tutorial site.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
James.H

James.H

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 866 posts
Good tut, just don't spam in the future.

#4
Bioshox

Bioshox

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 207 posts
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! :D