Recent

Author Topic: Getting Started with Free Pascal  (Read 2641 times)

TonyR500

  • New Member
  • *
  • Posts: 11
Getting Started with Free Pascal
« on: July 13, 2020, 07:24:41 pm »
I am trying to improve my knowledge of Pascal and have down loaded the Win 32 version which comes as a self extracting exe file. Now it sits on my hard drive and, what next?

I understand from a colleague that I should be seeing a desktop screen with menu choices across the top. I have no idea how to get to this.

I have no clue on how to use this compiler and haven't so far found any very elementary documentation on how to get started.

I would be grateful for some assistance please.

Many Thanks

ASBzone

  • Hero Member
  • *****
  • Posts: 678
  • Automation leads to relaxation...
    • Free Console Utilities for Windows (and a few for Linux) from BrainWaveCC
Re: Getting Started with Free Pascal
« Reply #1 on: July 13, 2020, 07:36:27 pm »
I am trying to improve my knowledge of Pascal and have down loaded the Win 32 version which comes as a self extracting exe file. Now it sits on my hard drive and, what next?

I understand from a colleague that I should be seeing a desktop screen with menu choices across the top. I have no idea how to get to this.

I have no clue on how to use this compiler and haven't so far found any very elementary documentation on how to get started.

I would be grateful for some assistance please.

Many Thanks


Hi TonyR500,

I would recommend that you go to the following link (https://www.lazarus-ide.org/index.php?page=downloads) and download the appropriate version of FreePascal with the Lazarus IDE.

You can choose the Windows 32-bit version as you did previously for FPC only.

Once you have run the executable, you will have a little bit more of a jump start into looking at FreePascal and Lazarus.

You can start here (https://wiki.freepascal.org/Lazarus_Documentation) for documentation.
-ASB: https://www.BrainWaveCC.com/

Lazarus v2.2.7-ada7a90186 / FPC v3.2.3-706-gaadb53e72c
(Windows 64-bit install w/Win32 and Linux/Arm cross-compiles via FpcUpDeluxe on both instances)

My Systems: Windows 10/11 Pro x64 (Current)

Warfley

  • Hero Member
  • *****
  • Posts: 1499
Re: Getting Started with Free Pascal
« Reply #2 on: July 13, 2020, 07:40:20 pm »
Have you installed Lazarus or only the FPC. The FPC is the compiler, while Lazarus is an IDE (Integrated development environment that contains an editor, can call the compiler, use a debugger and all the stuff you need).

I would recommend using Lazarus and not plain FPC.

If you Installed lazarus it is rather easy: Start Lazarus (probably somewhere in your start menu)
Now you should see a bunch of windows, amongst others a bar on the top containing a lot of icons, a WYSIWYG form editor (a Window called Form1 with dots on it) and a source code editor.
I would recommend first to get into the basics without the GUI stuff, for this simply go to (in the menu) File->New and select Program. Now a new Lazarus project should open with one Main Pascal File in the editor.
In the up most window there is a little green arrow button, use this to compile your code and start your application.

Thats the core basics, now you can start hacking

mr-highball

  • Full Member
  • ***
  • Posts: 233
    • Highball Github
Re: Getting Started with Free Pascal
« Reply #3 on: July 13, 2020, 08:29:34 pm »
Here's some "how to's" as well,
https://wiki.freepascal.org/Portal:HowTo_Demos

Another useful tool for setting up fpc/lazarus is fpcupdeluxe. It makes installing things real simple
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/1.8.0a/fpcupdeluxe-i386-win32.exe

Above is the link for windows. Just download, run the program, pick a install location (documents/desktop/ etc...), press the button install fpc + lazarus, it will put a lazarus shortcut on ypur desktop (just run it)

jamie

  • Hero Member
  • *****
  • Posts: 6130
Re: Getting Started with Free Pascal
« Reply #4 on: July 13, 2020, 08:54:38 pm »
Ot but I think fpc should be renamed to FOPC "free objects
 Pascal compiler"

The current name kind leads many into the direction of non object compiler
Back in the days of VAX.
The only true wisdom is knowing you know nothing

PascalDragon

  • Hero Member
  • *****
  • Posts: 5469
  • Compiler Developer
Re: Getting Started with Free Pascal
« Reply #5 on: July 14, 2020, 10:02:50 am »
Ot but I think fpc should be renamed to FOPC "free objects
 Pascal compiler"

Free Pascal is a multi dialect compiler, it supports non-object oriented dialects (TP, ISO Pascal, Extended ISO Pascal, FPC) just as object oriented ones (Delphi, MacPas, ObjFPC), thus it's correct to promote it as a Pascal compiler as that is the superset of the dialects.

TRon

  • Hero Member
  • *****
  • Posts: 2506
Re: Getting Started with Free Pascal
« Reply #6 on: July 14, 2020, 10:15:20 am »
Have you installed Lazarus or only the FPC. The FPC is the compiler, while Lazarus is an IDE (Integrated development environment that contains an editor, can call the compiler, use a debugger and all the stuff you need).

I would recommend using Lazarus and not plain FPC.
Small correction as FreePascal comes delivered with a text-mode IDE as well as all its additional tools.

I agree though, that for new-comers it would probably be easier to get into Pascal programming by using the Lazarus IDE (unless you are used to or expect to develop in textmode/shell environments).

Free Pascal is a multi dialect compiler, it supports non-object oriented dialects (TP, ISO Pascal, Extended ISO Pascal, FPC) just as object oriented ones (Delphi, MacPas, ObjFPC), thus it's correct to promote it as a Pascal compiler as that is the superset of the dialects.
The problem though is that not everyone (not being familiar with FreePascal) knows about the last part of that statement.

The wikipedia page does it fairly good by mentioning the dialect(s) from the get-go, but the freepascal.org page however does not. I more or less guess that this is the landing-page and introduction for most newcomers ?

PascalDragon

  • Hero Member
  • *****
  • Posts: 5469
  • Compiler Developer
Re: Getting Started with Free Pascal
« Reply #7 on: July 14, 2020, 01:53:15 pm »
Free Pascal is a multi dialect compiler, it supports non-object oriented dialects (TP, ISO Pascal, Extended ISO Pascal, FPC) just as object oriented ones (Delphi, MacPas, ObjFPC), thus it's correct to promote it as a Pascal compiler as that is the superset of the dialects.
The problem though is that not everyone (not being familiar with FreePascal) knows about the last part of that statement.

The wikipedia page does it fairly good by mentioning the dialect(s) from the get-go, but the freepascal.org page however does not. I more or less guess that this is the landing-page and introduction for most newcomers ?

It's mentioned further down in Features. Though feel free to report a bug. We've only recently reworked the target list at the top.

Edit: Oh and then there's the title: Free Pascal - Advanced open source Pascal compiler for Pascal and Object Pascal ;)
« Last Edit: July 14, 2020, 02:04:53 pm by PascalDragon »

VTwin

  • Hero Member
  • *****
  • Posts: 1215
  • Former Turbo Pascal 3 user
Re: Getting Started with Free Pascal
« Reply #8 on: August 02, 2020, 12:31:14 am »
« Last Edit: August 02, 2020, 12:43:41 am by VTwin »
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.2
macOS 12.1: Lazarus 2.2.6 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 2.2.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.2.6 (64 bit on VBox)

Handoko

  • Hero Member
  • *****
  • Posts: 5150
  • My goal: build my own game engine using Lazarus
Re: Getting Started with Free Pascal
« Reply #9 on: August 02, 2020, 06:40:34 am »
Also, this New Users Portal:
https://wiki.freepascal.org/Portal:New_Users

There new users can find many useful information, tutorials and demos.

 

TinyPortal © 2005-2018