Free Pascal Program Tutorial 1 – Getting Started – Lazarus Download Link – Mac Windows Linux
100 Comments


SchoolFreeware’s Free Pascal Program
Tutorials Tutorial 1 Getting Started. This new tutorial series replaces the Free
Pascal Tutorial Series. This new tutorial series includes more examples and topics to better meet the educational
requirements of students and teachers working with Pascal. There are two Free Pascal Lazarus Tutorial Series
available at SchoolFreeware, at the time for this video. This one is
the Program Series which works with the command line
interface and the other is the App Series which makes GUI or window type applications. The
code used within this series can be downloaded at SchoolFreeware.com. The series will
use the Free Pascal Compiler version 2.4.2 and Lazarus IDE version 9.30 32-bit. The Lazarus IDE with the Free Pascal
compiler works with Windows, Mac and Linux. It is similar to Turbo Pascal and Delphi. Lazarus with the Free Pascal compiler is a free download at lazarus.freepascal.org This is the Lazarus IDE and it
automatically start of with the windows type application
ready for programming however we are going to use the program part of Lazarus. So, I will go to File New and I will select program – here. Click OK. We are ready to start programming using the
command-line interface What we have here is the source editor.
The source editor is where you would put your code. If the source editor happens to be closed. You can always bring it back by going to view – source editor. Automatically Lazarus
has placed in some code for us and we are not going to make any
modifications to this code that Lazarus has put in. Towards the
bottom you find begin and end. This is we’re
going to put our code for our first program. I’ll start by writing to the screen. write line (writeln) then open parenthesis a single quote and
I’ll tell the computer to print This is the first program Another single quote Close parenthesis and semicolon. Anything within the single quotes as a
string – as you see here and the computer will write to the
screen verbatim whatever is within the
single quotes. So, I will go ahead and run. The project is successfully built and execution is stopped immediately. So, what has happened here is
the computer wrote to this line to the screen and immediately closed the window. So, what I
have to do is tell the computer to stop so that way I can see what’s going on. I’ll use the command read line (readln). The computer all pause until an enter key has been processed. I’ll go ahead and run. Alright, we got – this is the first program – Press enter the program now stops. What I would like to do is
place a couple of write lines so I can make a few spaces and I’ll have write line (writeln) Press enter to quit. If you are on a Macintosh you can have press
return to quit. So now I will go ahead and run. The computer is paused waiting for the
enter to be pressed. Alright, I’m going to make a little
modification to the program. I am going to write another line write line (writeln) This is another line. OK, I’ll go ahead and run Now we have two lines of text at the top. If I were to make modifications the program – Instead of using write line – I’ll use the command write. What will happen is this command write
will simply write verbatim whatever is within the single
quotes and will not make a new line. When I go ahead and run this we find that the two lines are actually
smashed together because I told the computer not to make a new line. I’ll go ahead and change it back. Run once more. Everything looks good. Ok I’ll go ahead and save this program and then I’ll go ahead and build
it. Go to File – go to Save I’ll place on the Desktop – New Folder You can put your folder wherever you
wish. I’ll call this new folder FPProgT1 for Free Pascal
program tutorial 1 i’ll go inside a folder and call the project
file FPProgT1 and I’ll go ahead and save. Ok. On the Desktop (In the Folder) – Here we have two files both are type Lazarus project information.
If I right-mouse click on the first one and go to properties I find this one has the
extension lpi and if I were to open up with Notepad – This is the XML for this program within Lazarus. I don’t want to mess
with the XML. The other file – properties. We find that this is an LPR
file. If I were to open this up with Notepad, I’ll
find that this is the actual code that we just got done working with. Okay, now
the program is saved, I like to go ahead build is. I am going back into Lazarus I’m going to go into Run and I am
going to Build My message says that Project1 has been successfully built. Here we should find the application
file. Here it is. This is the executable that we
just got done building. If I were to double-click – There’s our program.
This application a stand-alone. If I were to place it on the desktop I can run it straight from the desktop or any other place on the computer. There is the executable. OK, for the
next tutorial we will work with some mathematics

100 thoughts on “Free Pascal Program Tutorial 1 – Getting Started – Lazarus Download Link – Mac Windows Linux

  1. This is a really good series of tutorials for a really good compiler. Both are free. It doesn't get much better than that!

  2. It's not dead. Object Pascal is easier to learn and use that C++, and does the job just as well. Why do you say Pascal is dead, when the language is in fact so good that Embarcadero can charge what they like for Delphi! You're not making sense!

  3. Pascal is a great teaching language, and always has been. The fact that it has become object oriented in recent decades thru Delphi and Lazarus makes it an even better teaching language for students first time out. I only wish that textbooks on it were more accessible, since I am only aware of one book in English, and it doesn't seem to be available anywhere except online.

  4. It says in its website and other sites like wiki latest stable version is 1.0.8 and why this guy say version 9.3? Does he mean 0.9.3??

  5. I have a question: Are you running your pascall on pc or mac? because I downloaded mine on Mac, and I still can´t work on it, I follow all your steps and when I run, it give me this messaje: a timeout ocured, the debugger will try to continue, but furder error may occur later. How can I solve this? can you help me? thank you!!!

  6. At school they will teach as coding with pascal is it usefull language for beggining and why? answer plz cause i want to start learning things from now

  7. The syntax of the language is english like. This makes it easy to understand compared to other languages like c++.

  8. to anyone beginning to learn programming and look for an easy language to start, use python, dont waste your time with pascal. thank me later.

  9. If you want to call yourself a programmer you need to learn different programming languages. A real programmer can jump into any programming language.

  10. You are right!!!(and i want to know many languages)
    But even my school teacher said that Pascal is a useless language(its only used to teach highschoolers the basics of structure programming(as he said))
    I would prefer to learn languages like python, java, javascript etc. that are more used in our days.

  11. Wow, is qbasic still used? Is it still in DOS or are there newer versions now? My first was language was Amiga Basic before we got a PC, then I used Qbasic, in Windows 95. Also remember Nibbles snake game we played in school 🙂

  12. yeah we use windows xp, there are newer versions too. At home I use qb64 for win 7 also I copied the code for gorrilas and now everyone plays it. a couple vkids thought I made it (sorry for typos I broke my wrist and it is hard af to type).

  13. oh, no problem, hope your wrist will heal fine 🙂 I didn't know there was new versions of qbasic out. I also remember writing some code in "debug" that was possible to execute under cmd. I remember someone told me you couldn't call yourself a hacker unless you could write code with "debug" so I had to try and learn it, lol 😛 mov 13h, int 10h was most fun at that time.

  14. I have several issues when compiling my old TP programs to Free Pascal.

    For example: AT : MEM [$F000 : $FFFE] = $FC;
    This generates errors:

    1) Identifier not found "MEM"
    2) Syntax error, "]" expected but ":" found
    Compilation aborted.

    I can't solve this even with {$mode TP} and I guess FREE PASCAL is still far from being able to compile any program without any compatibility issues. 🙁

    Any help?

  15. Here a really good forum you should go check out, just google thehackerszone.forumotion. Has tutorials for beginner hackers, and advanced tutorials and delphi pascal and python.

  16. Just installed Lazarus IDE v1.2.4 and this tut does not work.  My IDE does not even recognize writeln(' … 0); as a valid command!  I'm sure I need some include file, but I do not yet know how to do that.  LOL.  Any chance of updating this tut to the latest Laz IDE?  Or, am I in the wrong tut series for my compiler??

  17. back from the past.. my computer still understand my pascal lang such as writeln..readln 🙂  nice software..   teach how to think procedural… step by step, making condition making selection.. such happy era..

  18. Great tutorial!
    For those of you who think Pascal is a dead language, are you ever wrong. Pascal aka Delphi is used heavily in the Aerospace industry to program satellites and such.
    As well, there is a professional multi-platform IDE available called Delphi XE that is developed by Embarcadero. This company bought Borland's software IP and still updates supports and sells new versions of C++ Builder, Delphi, Interbase.
    For those of you having a problem with Lazarus and getting your program to show output, just set a breakpoint right before your last end. statement.

  19. Hey…I would kindly need some help with pascal…its kinda confusing still..however my school gave me a task to complete by using pascal can I get some guidance towards this

  20. oh my fuck! it looks so simple and pure! and I'm destroyng my brain with java; in Java to print a line u must write something like this: System.out.println("hello"); I'm going to learn pascal very soon

  21. my response to "real programmers don't use pascal" (written in numeric code) 6 31 3 10 35 22 31

  22. is there a possibility to use "Lazarus" without it being separated into 4 different parts ((sours editor – object inspector -…)) ?
    cant it just all be in one single window ? :/

  23. Lazarus IDE 0.9.30 (32 bit), NOT 9.30 as shown at 0:40.Current version as of 2018 is Lazarus 1.8 and in development Lazarus 1.9.

  24. Who is using Pascal in 2018/2017 actually .. 2000+ .. It's no more used. Even programming languages like C or C# or C ++ aren't that much used, but programming language like Python HTML/CSS/JS are a lot more useful and they are really used ..

  25. I downloaded Lazarus but it runs like a mess… The toolbar, editor and object inspector are separated WTF?

  26. Im starting it as a hobby, for fun.
    When i was in school in around 2004, they taught it as to give you an example how programming language looks like.
    Its outdated but still a great program to get into the programming world.

  27. whaaaaaaaaaaaat the fck means : Compile succesful press any key
    P.S: I know its good but when i press any key it just does nothing!!!!
    I have searched through all the internet but did not get a response!!!!

  28. am having error by just adding the first two lines
    Project project1 raised exception class 'RunError(103)'
    What is happening?

  29. anyone to help… i just installed lazarus ide but on execution it just pops cmd and then give error mge like '' execution stopped''??

Leave a Reply

Your email address will not be published. Required fields are marked *