Recent

Author Topic: Definite pascal & IDE noob  (Read 1173 times)

gandsnut

  • Newbie
  • Posts: 2
Definite pascal & IDE noob
« on: June 21, 2024, 10:19:01 pm »
Hello:
I come from many years in 'C' & UNIX.  I've decided to learn Pascal.  To that extent, I've installed the latest Free Pascal Compiler, the Lazarus IDE, and CodeTyphon IDE.  I had hoped the two IDEs mentioned would provide a 'simple' environment for learning, but they are both daunting - to say the least.   So currently I use a general programmer's source editor & compile at the command line.

Q1:  Lazarus & CodeTyphon are essentially for building --applications--, not just terminal programs, correct?

Q2:  I'm very hard-pressed to find something current as a quasi-TurboPascal editor, compiler, and the closest found was 'Dev-Pas' which I have to run in a DOSBox/Wine window.  It doesn't seem to have a very good internal look-up for language reference.

Glad I found this Forum.    Thx.

jamie

  • Hero Member
  • *****
  • Posts: 6367
Re: Definite pascal & IDE noob
« Reply #1 on: June 21, 2024, 11:21:03 pm »
Use Lazarus, It's just a graphical Interface that gives you the point and click way of editing your code.
 
 You can create a new project (Program), and it allows you to select what type of program you want, console, GUI etc.

 THe Lazarus IDE allows you to edit and test run console apps, you don't need to use DOS style tools.
The only true wisdom is knowing you know nothing

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11641
  • FPC developer.
Re: Definite pascal & IDE noob
« Reply #2 on: June 21, 2024, 11:30:48 pm »
Lazarus is the best for working on source code, not just GUI, with its navigation and best debugger.

 Just a bit of persistence needed.

VisualLab

  • Sr. Member
  • ****
  • Posts: 388
Re: Definite pascal & IDE noob
« Reply #3 on: June 21, 2024, 11:35:19 pm »
Hello:
I come from many years in 'C' & UNIX.  I've decided to learn Pascal. 

It sounded like a confession of sins and a declaration of improvement :)

To that extent, I've installed the latest Free Pascal Compiler, the Lazarus IDE, and CodeTyphon IDE.  I had hoped the two IDEs mentioned would provide a 'simple' environment for learning, but they are both daunting - to say the least.   So currently I use a general programmer's source editor & compile at the command line.

Q1:  Lazarus & CodeTyphon are essentially for building --applications--, not just terminal programs, correct?

Q2:  I'm very hard-pressed to find something current as a quasi-TurboPascal editor, compiler, and the closest found was 'Dev-Pas' which I have to run in a DOSBox/Wine window.  It doesn't seem to have a very good internal look-up for language reference.

Glad I found this Forum.    Thx.

But seriously – Lazarus is perfectly suitable for creating console programs. And it is simple and convenient enough for an IDE working in a GUI. There is no need to use the RAD elements of this environment (although I appreciate them very much).

As for the term “application” – who said that the term refers only to the GUI? Both terms (i.e. application, program) can basically be used interchangeably. Their size in MB or the number of available options does not matter.

As for Lazarus – it is extensive, but it is still far from such behemoths as the current Visual Studio (which is an advantage of Lazarus). Yes, people who have never used an IDE may have a problem with its use at the initial stage (e.g. young people who have never programmed before or old people who have used practically only the terminal for years). It is known that the initial stage is the most difficult and requires a lot of patience and time. At least that is how I remember my beginnings with programming. Either way, I recommend Lazarus. It really saves time and simplifies the performance of repetitive and routine activities.

There are a lot of different videos on YouTube with Pascal examples done in Lazarus. Most of them are simple examples (as with most programming languages). A Pascal basics book may be useful for this.

I would like to point out one thing: "current Pascal is not your grandfather's Pascal". Similarly: "current C and C++ are not your grandfather's C and C++" (these are not my words :)

There is Pascal (procedural) and Object Pascal (object-oriented). Which is not to say that Object Pascal is only for creating GUI applications. The difference between Pascal and Object Pascal is (roughly) like the difference between C and C++ (except that Object Pascal isn't such a filthy and twisted crocodile as C++).
« Last Edit: June 21, 2024, 11:36:53 pm by VisualLab »

Thaddy

  • Hero Member
  • *****
  • Posts: 15131
  • Censorship about opinions does not belong here.
Re: Definite pascal & IDE noob
« Reply #4 on: June 21, 2024, 11:41:11 pm »
Lazarus is the best for working on source code, not just GUI, with its navigation and best debugger.
What's all this then? lpi, lpr, lpg? and % all over the code? Not a pas file in sight.
But you are right: there is no real alternative.
« Last Edit: June 21, 2024, 11:44:34 pm by Thaddy »
Of course the national anthem of the U.S.A. was written by Jimi Hendrix, didn't you know that?

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11641
  • FPC developer.
Re: Definite pascal & IDE noob
« Reply #5 on: June 21, 2024, 11:44:58 pm »
What's all this then? lpi, lpr, lpg? and % all over the code? Not a pas file in sight.
But you are right.

.lpr is a convention only, you can perfectly have a .pas main project. .lpi is a project file, as is pretty normal.

gandsnut

  • Newbie
  • Posts: 2
Re: Definite pascal & IDE noob
« Reply #6 on: June 22, 2024, 01:27:25 am »
Thanks lots for the feedback.  Retirement allows me to do whatever I want with my time.

Weiss

  • Full Member
  • ***
  • Posts: 149
Re: Definite pascal & IDE noob
« Reply #7 on: June 22, 2024, 02:34:52 am »
Hello:
I come from many years in 'C' & UNIX.  I've decided to learn ...
Q1:  Lazarus & CodeTyphon are essentially for building --applications--, not just terminal programs, correct?

Q2:  I'm very hard-pressed to find something current as a quasi-TurboPascal editor, compiler, and the closest found was 'Dev-Pas' which I have to run in a DOSBox/Wine window.  It doesn't seem to have a very good internal look-up for language reference.

Glad I found this Forum.    Thx.

Q2 is not a question but statement  :).

Q1: you can use Lazarus for anything you would normally use FPC, except better and faster.

This is from one noob to another. I been dodging learning Lazarus for over a year, because it was a bit overwhelming while fpc appealed as a “pure” Pascal language. Nowadays I mostly use Lazarus for even simple idea testing. Quite often I build applications for what is planned as a backend simple programs. With a touch of extra time invested, idea testbed becomes more useful and allows you to go further and faster, all because of components and more digestible data output.

Handoko

  • Hero Member
  • *****
  • Posts: 5245
  • My goal: build my own game engine using Lazarus
Re: Definite pascal & IDE noob
« Reply #8 on: June 22, 2024, 05:30:21 am »
Lazarus is good for building both GUI applications and terminal programs. Some prefer not to use Lazarus if they just want to build terminal programs, because of the simplicity and less-distracting of text-based IDE. That is personal preference.

But I want let you know testing/debugging terminal program directly from Lazarus IDE has some problems on Linux.
Lazarus main menu > View > Debug Windows > Console In/Output

So if you are a Linux user and use Lazarus to build terminal programs, you should test/run the program from your Linux Terminal.

Q1:  Lazarus & CodeTyphon are ...

I tried Code Typhon, it was interesting. It offered some features Lazarus did not have. I liked it actually. But I did not have time maintaining code to make it works on both, I only can pick one. I choose Lazarus because here we have Online Package Manage (OPM), Lazarus Android Module Wizard (LAMW), Bugtracker, detailed release notes and most importantly very active and helpful forum.

...  and the closest found was 'Dev-Pas' ...

Dev-Pascal can't run on Linux (without Wine) and has not been updated for quite a long time.
« Last Edit: June 22, 2024, 05:53:47 am by Handoko »

TRon

  • Hero Member
  • *****
  • Posts: 2861
Re: Definite pascal & IDE noob
« Reply #9 on: June 22, 2024, 05:55:21 am »
Dev-Pascal can't run on Linux (without Wine) and has not been updated for quite a long time.
I am able to confirm that. Having stopped using Windows for almost a decade now even back then dev-pas was buggy on modern Windows versions. It was a nice and simple alternative though.

PS : Projects using Lazarus - Editors and IDEs (though I find the part Projects using Lazarus odd: projects written/developed in/with Lazarus would imho be better suited).
« Last Edit: June 22, 2024, 06:18:21 am by TRon »

ccrause

  • Hero Member
  • *****
  • Posts: 916
Re: Definite pascal & IDE noob
« Reply #10 on: June 22, 2024, 08:10:19 am »
The difference between Pascal and Object Pascal is (roughly) like the difference between C and C++ (except that Object Pascal isn't such a filthy and twisted crocodile as C++).

More specifically Object Pascal is a pure extension of procedural Pascal, meaning one can freely mix procedural and Object Pascal code without worrying that the semantics of the procedural code will change. On the other hand the (in)compatibility of C and C++ makes for an interesting read.

Apologies for the detour...

MarkMLl

  • Hero Member
  • *****
  • Posts: 7065
Re: Definite pascal & IDE noob
« Reply #11 on: June 22, 2024, 09:02:57 am »
Lazarus is good for building both GUI applications and terminal programs. Some prefer not to use Lazarus if they just want to build terminal programs, because of the simplicity and less-distracting of text-based IDE. That is personal preference.

I think I'd like to qualify that. FPC+Lazarus are good at building both GUI-based "applications" and batch/console "programs" interacting via stdin and stdout (although by convention they're called something different). It's not so good at building something like a terminal emulator running as a GUI, unless you start looking for a suitable onscreen component to handle user interaction.

Quote
I tried Code Typhon, it was interesting. It offered some features Lazarus did not have. I liked it actually. But I did not have time maintaining code to make it works on both, I only can pick one. I choose Lazarus because here we have Online Package Manage (OPM), Lazarus Android Module Wizard (LAMW), Bugtracker, detailed release notes and most importantly very active and helpful forum.

There is friction between the projects, since each accuses the other of building on it and being reluctant to share a common community.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018