Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-06

newbie questions

14 messages · 9 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marco Ciampa

1) is this a developers only ml? Am I in the wrong list to ask general usage questions? I case vould you (please) point me to the right ml? TIA

2) the real question(s).

I work in a high school. I do not usually use fpc/lazarus but the whole project is interesting for me since it is able to do so many things that I've never seen in any other RAD tool, free or not.

We use fpc for education (algorithms/logic/etc.) mainly in the small time space in the math lessons but:

- DevPascal is old, buggy, undeveloped, untranslated and somehow works very bad under Windows if you are not an administrator (like a student in a school PC)

- FreePascal is a Dos app. , really ugly as was TP 20 years ago with similar concern regarding the multiuser use with Win...

- Lazarus works perfectly in Windows, is easy to install in school as at home and it works under Linux and Mac which is a real plus.

I've found some Delphi examples around in Internet, like this site:

http://www.pierotofy.it/pages/sorgenti/Pascal/

in particular this small game:

http://www.pierotofy.it/pages/sorgenti/dettagli/18955-Connect_Four/

If I import in Lazarus it works like a charm.

Ok now the real questions:

1) it "uses windows, graph;" where can I find reference info, examples and other doc about these libs?

2) if I vould like to port this program under Linux I imagine that the "windows" lib could be unusable. The shortest way to do it is ... ? Hints on how to do it are where?

TIA

Marco Ciampa +--------------------+ | Linux User #78271 | | FSFE fellow #364 | +--------------------+

Reply by email

Dave Coventry
to Marco Ciampa

Hi Marco,

I'm probably not the best person to welcome you, but as a fellow potterer who has been using Lazarus for a number of small projects, over the last ten years or so, welcome!

This is the ml I use whenever I want to ask questions and nobody has (yet!) disabused me, so I think you've come to the right place

Lazarus is still pretty close to Delhi and I still use the help files that came with my Delphi 3 installation for reference.

There are differences, though, but there is a lot of help on the Internet.

Such as this page:
http://wiki.lazarus.freepascal.org/Multiplatform_Programming_Guide

Marco Ciampa wrote 58 lines
1) is this a developers only ml? Am I in the wrong list to ask general usage ? questions? I case vould you (please) point me to the right ml? TIA 2) the real question(s). I work in a high school. I do not usually use fpc/lazarus but the whole project is interesting for me since it is able to do so many things that I've never seen in any other RAD tool, free or not. We use fpc for education (algorithms/logic/etc.) mainly in the small time space in the math lessons but: ?- DevPascal is old, buggy, undeveloped, untranslated and somehow works ? very bad under Windows if you are not an administrator ? (like a student in a school PC) ?- FreePascal is a Dos app. , really ugly as was TP 20 years ago with ? similar concern regarding the multiuser use with Win... ?- Lazarus works perfectly in Windows, is easy to install in school as ? at home and it works under Linux and Mac which is a real plus. I've found some Delphi examples around in Internet, like this site: http://www.pierotofy.it/pages/sorgenti/Pascal/ in particular this small game: http://www.pierotofy.it/pages/sorgenti/dettagli/18955-Connect_Four/ If I import in Lazarus it works like a charm. Ok now the real questions: 1) it "uses windows, graph;" where can I find reference info, examples ? and other doc about these libs? 2) if I vould like to port this program under Linux I imagine that the ? "windows" lib could be unusable. The shortest way to do it is ... ? ? Hints on how to do it are where? TIA -- Marco Ciampa +--------------------+ | Linux User ?#78271 | | FSFE fellow ? #364 | +--------------------+ -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Sven Barth
to Marco Ciampa: 1) is this a developers only ml? Am I in the wrong list to ask general usage questions? I…
Marco Ciampa wrote
1) is this a developers only ml? Am I in the wrong list to ask general usage questions? I case vould you (please) point me to the right ml? TIA

Yes, this is the correct list.

- FreePascal is a Dos app. , really ugly as was TP 20 years ago with similar concern regarding the multiuser use with Win...

You need to differentiate here:
1. Free Pascal is a compiler and thus the tool you use for compiling your Pascal code
2. The IDE is called fp (or also "text mode IDE") and this is not a DOS application (ok... a DOS version also exists, but only if you download it ;) ). It's a normal Windows command line application and uses the Windows Console API. fp also works on other platforms like Linux and OS/2.

Show quoted text 5 lines
Ok now the real questions: 1) it "uses windows, graph;" where can I find reference info, examples and other doc about these libs?

If you use unit "graph" you will at the end have a application that is also a "DOS application" (though it's not DOS per se) that you critized the text mode IDE above for. If you really want to use Lazarus to its fullest (thus writing GUI applications), I suggest you to read a tutorial like those available here:
http://wiki.lazarus.freepascal.org/Lazarus_Documentation#Lazarus_and_Pascal_Tutorials

2) if I vould like to port this program under Linux I imagine that the "windows" lib could be unusable. The shortest way to do it is ... ? Hints on how to do it are where?

Basically one can use unit Windows, but then you must use "ifdef" and other units and functions/procedures for other platforms. In Lazarus and it's component library LCL this is mostly abstracted and if you don't need specific Windows API functions most needs can be satisifed by looking into the units LCLProc, LCLType and LCLIntf though quite often you won't need all.

Regards,
Sven

Reply by email

Mattias Gaertner
to Marco Ciampa: 1) is this a developers only ml? Am I in the wrong list to ask general usage questions? I…

Marco Ciampa hat am 1. Juni 2012 um 12:05 geschrieben:

1) is this a developers only ml? Am I in the wrong list to ask general usage questions? I case vould you (please) point me to the right ml? TIA

You are welcome.
This list is about Lazarus. There are many other lists about fpc in general and about using fpc with other libraries/projects.

Show quoted text 6 lines
2) the real question(s). I work in a high school. I do not usually use fpc/lazarus but the whole project is interesting for me since it is able to do so many things that I've never seen in any other RAD tool, free or not.

:)

Show quoted text 10 lines
We use fpc for education (algorithms/logic/etc.) mainly in the small time space in the math lessons but: - DevPascal is old, buggy, undeveloped, untranslated and somehow works very bad under Windows if you are not an administrator (like a student in a school PC) - FreePascal is a Dos app. , really ugly as was TP 20 years ago with similar concern regarding the multiuser use with Win...

No, Free Pascal is the compiler, some tools and a lot of libraries. It also has a console IDE called "fp".
Most compilers are command line utilities and fpc is no exception. Lazarus simply calls fpc to compile your code.
Console applications are far older than DOS, still the best tool for many tasks and there are still new console tools are invented.

Show quoted text 18 lines
- Lazarus works perfectly in Windows, is easy to install in school as at home and it works under Linux and Mac which is a real plus. I've found some Delphi examples around in Internet, like this site: http://www.pierotofy.it/pages/sorgenti/Pascal/ in particular this small game: http://www.pierotofy.it/pages/sorgenti/dettagli/18955-Connect_Four/ If I import in Lazarus it works like a charm. Ok now the real questions: 1) it "uses windows, graph;" where can I find reference info, examples and other doc about these libs?

These are not Lazarus units.
The windows unit is simply the binding to the MS Windows libraries, so you can find the never used the graph unit, so I can't help here.

2) if I vould like to port this program under Linux I imagine that the "windows" lib could be unusable. The shortest way to do it is ... ? Hints on how to do it are where?

The graph unit exists under Linux too. FPC provides platform independent functions for most system tasks.

Mattias

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120601/7ea3da6a/attachment.html>

Reply by email

Marco Ciampa
to Marco Ciampa: 1) is this a developers only ml? Am I in the wrong list to ask general usage questions? I…
Marco Ciampa wrote
- FreePascal is a Dos app. , really ugly as was TP 20 years ago with similar concern regarding the multiuser use with Win...

I meant the FreePascal IDE that comes if you download the FreePascal package. Put yourself in the shoes of a student: this is FreePascal, it is written everywhere... may be a good idea to change the package name into FreePascal_IDE... but of course I know that fpc is the common underlying compiler of all. I was comparing IDEs...

Marco Ciampa +--------------------+ | Linux User #78271 | | FSFE fellow #364 | +--------------------+

Reply by email

Marco Ciampa
to Dave Coventry: I'm probably not the best person to welcome you, but as a fellow potterer who has been…
Dave Coventry wrote
Hi Marco, Lazarus is still pretty close to Delhi and I still use the help files that came with my Delphi 3 installation for reference.

Too bad. So for Lazarus use I have to study (and buy!) Delphi first... very strange situation for a free software. I understand why it is so but ... maybe a free documentation project could rightly fit here...

Thanks for the info, I'll do some experiments...

Marco Ciampa +--------------------+ | Linux User #78271 | | FSFE fellow #364 | +--------------------+

Reply by email

Mattias Gaertner
to Marco Ciampa

Marco Ciampa hat am 1. Juni 2012 um 13:19 geschrieben:

Show quoted text 11 lines
On Fri, Jun 01, 2012 at 12:28:40PM +0200, Dave Coventry wrote: > Hi Marco, > > Lazarus is still pretty close to Delhi and I still use the help files > that came with my Delphi 3 installation for reference. Too bad. So for Lazarus use I have to study (and buy!) Delphi first... very strange situation for a free software. I understand why it is so but ... maybe a free documentation project could rightly fit here... Thanks for the info, I'll do some experiments...

There are already thousands of pages of documentation for FPC and Lazarus. And there are books and forums and much more.
The Delphi 3 help files are a very good quality, most things are still correct and some topics are better explained there (better depends on your background and taste). There is nothing wrong to read them as an introduction, but you should read the FPC/Lazarus docs too.

Mattias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120601/1163e8e4/attachment-0001.html>

Reply by email

Torsten Bonde Christiansen
to Marco Ciampa: Too bad. So for Lazarus use I have to study (and buy!) Delphi first... very strange…
Marco Ciampa wrote 9 lines
On Fri, Jun 01, 2012 at 12:28:40PM +0200, Dave Coventry wrote: > Hi Marco, > > Lazarus is still pretty close to Delhi and I still use the help files > that came with my Delphi 3 installation for reference. Too bad. So for Lazarus use I have to study (and buy!) Delphi first... very strange situation for a free software. I understand why it is so but ... maybe a free documentation project could rightly fit here...

This is not entirely true! Embacardo (who owns the Delphi brand now) have placed
the entire API documentation on their website here:

http://docwiki.embarcadero.com/Libraries/en/Main_Page

And as I have understood the Lazarus project, a major aim is to be Dephi compatible as
much as possible (I this goes for FreePascal as well). So most of this documentation
should fit the general need.

I personally use the online API documentation for RTL, FCL and LCL which can be
found here:

http://lazarus-ccr.sourceforge.net/docs/

Kind regards,
Torsten Bonde Christiansen.

Reply by email

Sven Barth
to Marco Ciampa: I meant the FreePascal IDE that comes if you download the FreePascal package. Put…
Marco Ciampa wrote 10 lines
On Fri, Jun 01, 2012 at 12:05:23PM +0200, Marco Ciampa wrote: > - FreePascal is a Dos app. , really ugly as was TP 20 years ago with > similar concern regarding the multiuser use with Win... I meant the FreePascal IDE that comes if you download the FreePascal package. Put yourself in the shoes of a student: this is FreePascal, it is written everywhere... may be a good idea to change the package name into FreePascal_IDE... but of course I know that fpc is the common underlying compiler of all. I was comparing IDEs...

It's not an extra package it is PART of the Free Pascal distribution (and it's Free Pascal, not FreePascal). Also it's called "fp" already... Also there are people that liked and still like the look and feel of the Turbo Pascal IDE (tough I'll always prefer a good GUI like Lazarus to fp).

Regards,
Sven

Reply by email

Mark Morgan Lloyd
to Sven Barth: Yes, this is the correct list. You need to differentiate here: 1. Free Pascal is a…
Sven Barth wrote 11 lines
> - FreePascal is a Dos app. , really ugly as was TP 20 years ago with > similar concern regarding the multiuser use with Win... > You need to differentiate here: 1. Free Pascal is a compiler and thus the tool you use for compiling your Pascal code 2. The IDE is called fp (or also "text mode IDE") and this is not a DOS application (ok... a DOS version also exists, but only if you download it ;) ). It's a normal Windows command line application and uses the Windows Console API. fp also works on other platforms like Linux and OS/2.

In fairness, a lot of people refer to "DOS prompt" even when they really mean a Linux shell session (Konsole etc.). Even more people call that sort of thing a terminal, which is particularly irritating to those of us who do use terminal emulators on a regular basis.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Hans-Peter Diettrich
to Marco Ciampa: Too bad. So for Lazarus use I have to study (and buy!) Delphi first... very strange…
Show quoted text 9 lines
On Fri, Jun 01, 2012 at 12:28:40PM +0200, Dave Coventry wrote: > Hi Marco, > > Lazarus is still pretty close to Delhi and I still use the help files > that came with my Delphi 3 installation for reference. Too bad. So for Lazarus use I have to study (and buy!) Delphi first... very strange situation for a free software. I understand why it is so but ... maybe a free documentation project could rightly fit here...

Hit F1?

FPC comes with its own documentation tool FPDoc, and pretty informative online help. You also can (should?) install FPC help for offline reading, e.g. in CHM format.

The Lazarus IDE now shows the help entries for every identifier under the mouse. This is achieved by presenting the help sources in raw format. When you open the FPDocEditor window in the IDE, you can see and also edit the LCL help entries.

While help on FPC (language, RTL, FCL...) is very nice, help on Lazarus and LCL is very rudimentary. That's why Delphi Help is usually recommended for Lazarus, it covers the common topics better. LCL specific extensions and modifications traditionally are undocumented, the few exceptions are frequently outdated, and leave more questions than answers.

DoDi

Reply by email

Massimo Soricetti
to Marco Ciampa: 1) is this a developers only ml? Am I in the wrong list to ask general usage questions? I…

Il 01/06/2012 12:05, Marco Ciampa ha scritto:

1) it "uses windows, graph;" where can I find reference info, examples and other doc about these libs?

Hello Marco,

your questions hit the really, really painful issue about Lazarus and every other medium-large sized open source project: DOCUMENTATION IS CRAP :-(

You can find some old (but very good) Delphi .HLP files, since the VCL is not changed... but for everything newer than that, like jedi libraries or the new components, you are doomed to work your way among insufficient docs, source code and tiny sample projects. :-(((

Reply by email

leledumbo
to Marco Ciampa: 1) is this a developers only ml? Am I in the wrong list to ask general usage questions? I…
it "uses windows, graph;" where can I find reference info, examples

and other doc about these libs?

Windows unit is a binding to Windows API. It's not documented as it would be HUGE work and too duplicated since MSDN already documents it very well. The problem is that you have to understand C a bit, in particular, how to map C things to their Pascal equivalent, when reading MSDN docs.

if I vould like to port this program under Linux I imagine that the

"windows" lib could be unusable. The shortest way to do it is ... ? Hints on how to do it are where?

Depends on how tight the code is to Windows API. In short, you have to find all Windows API specific usage, and replace it with its equivalent on your target platform. Using LCL (via LCLType, LCLProc and LCLIntf), some of the Windows API specific things are made cross-platform with the same interface as Windows API one. This is not the recommended way to write cross-platform apps, but it can't help quick and dirty porting. You can find some articles regarding multiplatform programming here:
http://wiki.freepascal.org/Multiplatform_Programming_Guide

View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-newbie-questions-tp4024223p4024289.html Sent from the Free Pascal - Lazarus mailing list .

Reply by email