Sign in Join

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

Mailing lists / fpc-pascal / 2008-01

Maybe a new fpc book :)

30 messages · 18 people · –

Reply by email Subscribe to this list Your subscription

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

Anthony W. Henry

I recently responded to a question on the community board asking about an fpc book by recommending a Turbo Pascal book by Jeff Duntemann. His book started me out as a Pascal programmer in 1989 and I still find these old books useful from time to time.

I have two by him:
Turbo Pascal from Square One
The Complete Borland Pascal

Mr. Duntemann has also written other programming books and was employed by Borland for a while as a technical writer. I have found his books to be the best available for learning Pascal.

When I responded to the board question it started a train of thought that resulted me in contacting Mr. Duntemann about writing a book on FPC. To my (pleased) surprise I found him provisionally enthusiastic for the project.(He hasn't made his mind up yet).

He has the following questions for the community.
POSTED WITH HIS PERMISSION.

1. What OS is most-used for Free Pascal? Windows? Linux?

2. What libraries do most people use for console (i.e., "terminal" or text-mode) apps? I dislike ncurses; is there a better way?

3. Does anybody really use Free Pascal to write Win32 apps?

4. Do people make heavy use of Free Pascal objects?

These are important questions, because I want to bring newcomers up to speed with the tools and OSes they're most likely to use as they get better.

I will probably release the rewritten book as a free ebook, and offer printed copies of the book through Lulu.com, where I publish a number of other things now. See:

http://www.lulu.com/copperwood

I don't expect to make much money on the project; I made my money on the book back in 1993 when it was first run. I love Pascal and would like to see my book still
available to Pascal people.

Reply by email

Anthony W. Henry
to Anthony W. Henry

I missed one. Mr. Duntemann closed with this question:

What forum would be best for me to join to discuss how to rewrite the book for FP?

Anthony

Anthony W. Henry wrote 52 lines
I recently responded to a question on the community board asking about an fpc book by recommending a Turbo Pascal book by Jeff Duntemann. His book started me out as a Pascal programmer in 1989 and I still find these old books useful from time to time. I have two by him: Turbo Pascal from Square One The Complete Borland Pascal Mr. Duntemann has also written other programming books and was employed by Borland for a while as a technical writer. I have found his books to be the best available for learning Pascal. When I responded to the board question it started a train of thought that resulted me in contacting Mr. Duntemann about writing a book on FPC. To my (pleased) surprise I found him provisionally enthusiastic for the project.(He hasn't made his mind up yet). He has the following questions for the community. POSTED WITH HIS PERMISSION. 1. What OS is most-used for Free Pascal? Windows? Linux? 2. What libraries do most people use for console (i.e., "terminal" or text-mode) apps? I dislike ncurses; is there a better way? 3. Does anybody really use Free Pascal to write Win32 apps? 4. Do people make heavy use of Free Pascal objects? These are important questions, because I want to bring newcomers up to speed with the tools and OSes they're most likely to use as they get better. I will probably release the rewritten book as a free ebook, and offer printed copies of the book through Lulu.com, where I publish a number of other things now. See: http://www.lulu.com/copperwood I don't expect to make much money on the project; I made my money on the book back in 1993 when it was first run. I love Pascal and would like to see my book still available to Pascal people. _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Bee
to Anthony W. Henry: I recently responded to a question on the community board asking about an fpc book by…
He has the following questions for the community.

Since I feel as being part of the community, I'd like to answer. :)

1. What OS is most-used for Free Pascal? Windows? Linux?

For me... 80% Linux, 20% Windows, 0% MacOS. But this will change if I got a MacBook, perhaps I'll have 20% usage on this OS. :-D

2. What libraries do most people use for console (i.e., "terminal" or text-mode) apps? I dislike ncurses; is there a better way?

For console app, I used basic CRT unit provided by FPC.

3. Does anybody really use Free Pascal to write Win32 apps?

I do. I never wrote console app on win32 using fpc, but I wrote some GUI apps on win32 using Lazarus which is powered by fpc. ;)

4. Do people make heavy use of Free Pascal objects?

Does 'objects' here refer to object oriented programming or refer to TP's style class? If it means OOP, then I do make heavy use of OOP in FPC, especially the FCL. It it means the last, then I no longer touch this object paradigm since I used Delphi. ;)

These are important questions, because I want to bring newcomers up to speed with the tools and OSes they're most likely to use as they get better.

Hope this would help. :)

-Bee-

has Bee.ography at:
http://beeography.wordpress.com

Reply by email

Anthony W. Henry
to Bee
Bee wrote 6 lines
> What forum would be best for me to join to discuss how to rewrite the > book for FP? This list, no? :-D -Bee-

I suggested this too. This is all really fast (just a couple of days) and he is not making a commitment yet. I don't want to scare him off :).

Thanks for your answers. I'm going to wait until I get a few more before forwarding them to Mr. Duntemann.

Anthony

Show quoted text 7 lines
has Bee.ography at: http://beeography.wordpress.com _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Michael Van Canneyt
to Anthony W. Henry: I recently responded to a question on the community board asking about an fpc book by…
Anthony W. Henry wrote 23 lines
I recently responded to a question on the community board asking about an fpc book by recommending a Turbo Pascal book by Jeff Duntemann. His book started me out as a Pascal programmer in 1989 and I still find these old books useful from time to time. I have two by him: Turbo Pascal from Square One The Complete Borland Pascal Mr. Duntemann has also written other programming books and was employed by Borland for a while as a technical writer. I have found his books to be the best available for learning Pascal. When I responded to the board question it started a train of thought that resulted me in contacting Mr. Duntemann about writing a book on FPC. To my (pleased) surprise I found him provisionally enthusiastic for the project.(He hasn't made his mind up yet). He has the following questions for the community. POSTED WITH HIS PERMISSION. 1. What OS is most-used for Free Pascal? Windows? Linux?

If I remember the download statistics correctly:
Windows comes first and then Linux.

2. What libraries do most people use for console (i.e., "terminal" or text-mode) apps? I dislike ncurses; is there a better way?

You can use crt or the video unit provided by FPC. You have Free Vision, the Free Pascal port of the old turbo vision.

3. Does anybody really use Free Pascal to write Win32 apps?

Sure. Some people use it to create their flagship applications.

4. Do people make heavy use of Free Pascal objects?

I think this depends on the definition of objects: The Old TP-Style: probably not any more, or very limited at any rate. The new Delphi style: Yes, it is heavily used.

As for information: he can always join this list or the lazarus list.

Michael.

Reply by email

Johann Glaser
to Michael Van Canneyt

Hi!

> 1. What OS is most-used for Free Pascal? Windows? Linux? If I remember the download statistics correctly: Windows comes first and then Linux.

I want to note that mostly all Windows users download FreePascal and Lazarus by their own from the original download servers. OTOH many Linux users get FreePascal via their distribution. At least Debian provides packages, but I assume some other distributions too.

So it all is about the "invisible" Linux downloaders. Do they really exist? Or do they update so regularly that they don't want to rely on their distribution?

Bye
Hansi

Reply by email

Graeme Geldenhuys
to Anthony W. Henry: I recently responded to a question on the community board asking about an fpc book by…
1. What OS is most-used for Free Pascal? Windows? Linux?

We (our company) mainly develop under Linux, but all products are for both Linux and Windows platforms.

2. What libraries do most people use for console (i.e., "terminal" or text-mode) apps? I dislike ncurses; is there a better way?

I only write small console based utility apps. Mainly for debuging or prototyping some concept. writeln() is my friend. :)

3. Does anybody really use Free Pascal to write Win32 apps?

Linux and Windows are equally important to us for GUI apps. Though we (our company) are having more and more talks about phasing our franchises over to Linux. Stability, money and no viruses are the main reasons.

4. Do people make heavy use of Free Pascal objects?

If that referres to classes as in OOP then YES.

I will probably release the rewritten book as a free ebook, and offer printed copies of the book through

That would be awesome...

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Johann Glaser: Hi! I want to note that mostly all Windows users download FreePascal and Lazarus by their…
Johann Glaser wrote
So it all is about the "invisible" Linux downloaders.

I agree...plus the Linux downloads are split into lots of small packages, were the Windows download is one file. This is also what drives me mad about companies publishing the populaty of OSes based on sales or whatever else (I mention no names.. :) ). Linux has a huge "invisible" community because we are allowed to distribute copies legally and get them from all over the internet without payment. Windows OS copies are much easier to track because they have to be bought and registered.

I'm going a bit off-topic here, sorry. But again, Linux users can now get copies via 'apt'. Then what about the loads of people using 'svn' to keep up to date. I think I've only downloaded one copy of FPC for Windows and Linux, but have been keeping up to date via svn for the last 3 years. I don't think we will every be able to give a accurate count per OS.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

DONALD PEDDER
to Anthony W. Henry: I missed one. Mr. Duntemann closed with this question: What forum would be best for me to…

Coming out of lurk mode...

1. What OS is most-used for Free Pascal? Windows? Linux?

Well, speaking just for myself, :-) I'm still using DR-DOS (I have Windows as well, but not by choice. Grrr - the punitive measures in the anti-trust case didn't go far enough! I don't buy software unless I have no choice. e.g. I have written my own programs for budgetting, stats, etc.). Eventually I want to make some of my programs multi-platform, but it would still be command-line based rather than windows based (graphics just slows everything up, so unless needed... "a picture is worth a thousand words, but it takes 10,000 times the memory").

2. What libraries do most people use for console (i.e., "terminal" or text-mode) apps? I dislike ncurses; is there a better way?

CRT and strings, and that's about it.

3. Does anybody really use Free Pascal to write Win32 apps?

Not specifically, but I try to make my DOS programs work in Windows as well (not easy, given how much MS crippled their version of DOS - at least one program I gave up on keeping it Windows compatible, though in future I might make use of some multi-platform system units to help this project. Have to face facts that most people use Windows, even if it's a really crappy OS :-\ ).

4. Do people make heavy use of Free Pascal objects?

Nope, but if it was covered in a book I might be more inclined to do so.

It would be good to have a more up-to-date Pascal book (there are features in FPC which aren't in my old Pascal books. e.g. OO, strings, passing filenames as parameters, etc.) - I'd buy a printed copy (or an E-copy I could print).

thanks,
DONALD.

BIG DON's Home-page - http://jedi.apana.org.au/~jims_son Pedder Passer Rating - http://jedi.apana.org.au/~jims_son/PPR AusNFL mailing-list - http://jedi.apana.org.au/mailman/listinfo/ausnfl

"What I always wanted is to be accepted, not understood" - MAN RAY

Reply by email

Daniël Mantione
to Graeme Geldenhuys: I agree...plus the Linux downloads are split into lots of small packages, were the…

Op Wed, 2 Jan 2008, schreef Graeme Geldenhuys:

Show quoted text 6 lines
On 02/01/2008, Johann Glaser wrote: > > So it all is about the "invisible" Linux downloaders. I agree...plus the Linux downloads are split into lots of small packages, were the Windows download is one file.

I have the impression the amount of Windows users is still significantly bigger than the amount of Linux users. However, Linux users are more active in the community.

A good book targets both groups of users and teaches users to use
{$ifdef windows}/{$ifdef unix} where needed.

Daniël

Reply by email

Daniël Mantione
to Michael Van Canneyt: If I remember the download statistics correctly: Windows comes first and then Linux. You…

Op Wed, 2 Jan 2008, schreef Michael Van Canneyt:

Show quoted text 6 lines
> 2. What libraries do most people use for console (i.e., > "terminal" or text-mode) apps? I dislike ncurses; is > there a better way? You can use crt or the video unit provided by FPC. You have Free Vision, the Free Pascal port of the old turbo vision.

Perhaps it is usefull to node him the use cases in which you would choose what API:
* Simple text mode programming: crt
* Advanced textmode UIs: Free Vision
* Maximum flexibility: Video & keyboard units

Ncurses could be used as "the unix way", but is rather primitive compared to FV.

> 3. Does anybody really use Free Pascal to write Win32 > apps? Sure. Some people use it to create their flagship applications.

Indeed, but there are three categories of Win32 programs that are popular:
* LCL applications, coded through Lazarus
* Games, often using JEDI-SDL and OpenGL
* Win32 command line applications

Users from each group might be interrested to learn different things... Users that don't belong to these groups do of course also exist.

Daniël

Reply by email

tazio mirandola
to Anthony W. Henry: I recently responded to a question on the community board asking about an fpc book by…

i'm a delphi programmer and a FP beginner, it completly lacks good books focusing on FP and LCL, the book i'm looking for:

1. What OS is most-used for Free Pascal? Windows? Linux?

mostly windows, but linux and osx are important too, crossplatform tricks are welcome.
consider FP being cross platform is a main advantage over delphi and .net

2. What libraries do most people use for console (i.e., "terminal" or text-mode) apps?

writeln is enough for simple personal tools, but in 2008 is hard to sell a text-mode app, so this is not the killer library nowadays while internet and database lib are more important for modern real projects

3. Does anybody really use Free Pascal to write Win32 apps?

absolutely yes, the vision behind lazarus is to replace Delphi

4. Do people make heavy use of Free Pascal objects?

absolutely yes, patterns and algorithms are interesting too.

a question about the odience:
should this book be for totally beginners or for (somehow) experienced programmers coming from others environments?

Reply by email

Milan Marusinec
to Anthony W. Henry: I recently responded to a question on the community board asking about an fpc book by…

Hello,

4. Do people make heavy use of Free Pascal objects?

I will answer this question in the sence of meaning the object as a type for OOP.

Recently in my two pascal projects, which by the way are relatively very current,
I used only "objects" and not "classes". You can find those projects here: http://www.aggpas.org (Vector Graphics Engine, native port) http://www.icu4pas.org (Unicode I18N library, direct class wrapper)

Every delphi programmer would wonder why the hell to use that archaic type, which is marked as "obsolete" in Borland documentation. But it has a very strong technical background argument in simple fact, and that is impossibility to allocate classes on the stack, because classes are always allocated on the Heap. Here again delphi programmer would very very wonder, why one would want to allocate classes on the Stack ? Answer is that those two project are direct 1:1 ports from C/C++, where classes technically can be on Stack and also on the Heap, and to mimic this behaviour is possible
only when using "object" types and not "classes".

That's my two cents
Milano

Reply by email

Joost van der Sluis
to Anthony W. Henry: I recently responded to a question on the community board asking about an fpc book by…

Op woensdag 02-01-2008 om 12:35 uur [tijdzone -0500], schreef Anthony W. Henry:

Show quoted text 18 lines
I recently responded to a question on the community board asking about an fpc book by recommending a Turbo Pascal book by Jeff Duntemann. His book started me out as a Pascal programmer in 1989 and I still find these old books useful from time to time. I have two by him: Turbo Pascal from Square One The Complete Borland Pascal Mr. Duntemann has also written other programming books and was employed by Borland for a while as a technical writer. I have found his books to be the best available for learning Pascal. When I responded to the board question it started a train of thought that resulted me in contacting Mr. Duntemann about writing a book on FPC. To my (pleased) surprise I found him provisionally enthusiastic for the project.(He hasn't made his mind up yet).

That would be PERFECT!

I've learned all I know from him!

Got his books from the library when I was 10 or so... After a while I had to bring them back, then I had to wait for two months before I could lend them again...

I never found a copy for myself, though...

Joost.

Reply by email

Anthony W. Henry
to Joost van der Sluis
Show quoted text 18 lines
> Mr. Duntemann has also written other programming books and > was employed by Borland for a while as a technical writer. I have > found his books to be the best available for learning Pascal. > > When I responded to the board question it started a train of > thought that resulted me in contacting Mr. Duntemann about writing > a book on FPC. To my (pleased) surprise I found him provisionally > enthusiastic for the project.(He hasn't made his mind up yet). That would be PERFECT! I've learned all I know from him! Got his books from the library when I was 10 or so... After a while I had to bring them back, then I had to wait for two months before I could lend them again... I never found a copy for myself, though...

Mr. Duntemann's older books can still be found on amazon.

Anthony

Show quoted text 6 lines
Joost. _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Marco Ciampa
to Anthony W. Henry: I recently responded to a question on the community board asking about an fpc book by…

I work in a high school in Italy.
We are currently using fpc + gnuplot for math and phisics simulations. In one lab we are currently starting to use Linux as the _sole_ platform.

Anthony W. Henry wrote
1. What OS is most-used for Free Pascal? Windows? Linux?

80% windows and 20% Linux (this one growing)

2. What libraries do most people use for console (i.e., "terminal" or text-mode) apps? I dislike ncurses; is there a better way?

console & graph unit (BGI drivers under windows and Linux (X _not_ VGAlib) )

3. Does anybody really use Free Pascal to write Win32 apps?

yes

4. Do people make heavy use of Free Pascal objects?

not (for now) in our school

We are currently porting several astronomical turbo pascal programs for fpc (win and Linux)

bye

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

Reply by email

Florian Klaempfl
to Marco Ciampa
Show quoted text 13 lines
I work in a high school in Italy. We are currently using fpc + gnuplot for math and phisics simulations. In one lab we are currently starting to use Linux as the _sole_ platform. On Wed, Jan 02, 2008 at 12:35:57PM -0500, Anthony W. Henry wrote: > 1. What OS is most-used for Free Pascal? Windows? Linux? 80% windows and 20% Linux (this one growing) > 2. What libraries do most people use for console (i.e., > "terminal" or text-mode) apps? I dislike ncurses; is > there a better way? console & graph unit (BGI drivers under windows and Linux (X _not_ VGAlib) )

If one writes a book, _please_ use SDL for graphics and skip the legacy graph unit :)

Reply by email

Damien Gerard
to Florian Klaempfl
Florian Klaempfl wrote 12 lines
Marco Ciampa schrieb: > I work in a high school in Italy. > We are currently using fpc + gnuplot for math and phisics > simulations. > In one lab we are currently starting to use Linux as the _sole_ > platform. > > On Wed, Jan 02, 2008 at 12:35:57PM -0500, Anthony W. Henry wrote: >> 1. What OS is most-used for Free Pascal? Windows? >> Linux? > 80% windows and 20% Linux (this one growing) >

Not OS X at all ? I am a bit surprised.

Show quoted text 10 lines
>> 2. What libraries do most people use for console >> (i.e., >> "terminal" or text-mode) apps? I dislike ncurses; is >> there a better way? > console & > graph unit (BGI drivers under windows and Linux (X _not_ VGAlib) ) If one writes a book, _please_ use SDL for graphics and skip the legacy graph unit :)

Agree :)

Damien Gerard People who used magic without knowing what they were doing usually came to a sticky end. All over the entire room, sometimes. -- (Terry Pratchett, Moving Pictures)

Reply by email

Marco Ciampa
to Florian Klaempfl: If one writes a book, _please_ use SDL for graphics and skip the legacy graph unit :)
Florian Klaempfl wrote 6 lines
Marco Ciampa schrieb: > console & > graph unit (BGI drivers under windows and Linux (X _not_ VGAlib) ) If one writes a book, _please_ use SDL for graphics and skip the legacy graph unit :)

I may agree, yes, but a simple chapter on how to port a old (and working) Borland BGI app to fpc could be veeery useful and not harmful at all...

bye

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

Reply by email

Ingemar Ragnemalm
Florian Klaempfl wrote 20 lines
> Marco Ciampa schrieb: > >> I work in a high school in Italy. >> We are currently using fpc + gnuplot for math and phisics >> simulations. >> In one lab we are currently starting to use Linux as the _sole_ >> platform. >> >> On Wed, Jan 02, 2008 at 12:35:57PM -0500, Anthony W. Henry wrote: >> >>> 1. What OS is most-used for Free Pascal? Windows? >>> Linux? >>> >> 80% windows and 20% Linux (this one growing) >> >> Not OS X at all ? I am a bit surprised.

Me too, I am using FPC daily on OSX and have recommended many to do the same. It might not be many percent but certainly growing.

And there are so many other FPC platforms, so we better set aside a few percent for the rest of us.

Speaking of books for teaching FPC, could one not take an old classic Pascal book and update it with the news? There are many abandoned books that the author may enjoy seeing brought back to life. But maybe it is better to write it from the modern perspective from the start.

/Ingemar

Reply by email

Vincent Snijders
to Ingemar Ragnemalm
Ingemar Ragnemalm wrote 7 lines
On Jan 5, 2008, at 11:11 AM, Florian Klaempfl wrote: Speaking of books for teaching FPC, could one not take an old classic Pascal book and update it with the news? There are many abandoned books that the author may enjoy seeing brought back to life. But maybe it is better to write it from the modern perspective from the start.

One of them is in Dutch called "Turbo Pascal in de praktijk" and can be retrieved from SVN: http://svn.freepascal.org/svn/tpidp/trunk/

Vincent

Reply by email

Marco Ciampa
to Florian Klaempfl: If one writes a book, _please_ use SDL for graphics and skip the legacy graph unit :)
Florian Klaempfl wrote 17 lines
Marco Ciampa schrieb: > I work in a high school in Italy. > We are currently using fpc + gnuplot for math and phisics simulations. > In one lab we are currently starting to use Linux as the _sole_ platform. > > On Wed, Jan 02, 2008 at 12:35:57PM -0500, Anthony W. Henry wrote: >> 1. What OS is most-used for Free Pascal? Windows? Linux? > 80% windows and 20% Linux (this one growing) > >> 2. What libraries do most people use for console (i.e., >> "terminal" or text-mode) apps? I dislike ncurses; is >> there a better way? > console & > graph unit (BGI drivers under windows and Linux (X _not_ VGAlib) ) If one writes a book, _please_ use SDL for graphics and skip the legacy graph unit :)

Can someone please point me a simple BGI to SDL howto or some very simple Fpc SDL tutorials?

TIA

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

Reply by email

Tom Verhoeff
to Vincent Snijders: One of them is in Dutch called "Turbo Pascal in de praktijk" and can be retrieved from…
Vincent Snijders wrote
One of them is in Dutch called "Turbo Pascal in de praktijk" and can be retrieved from SVN: http://svn.freepascal.org/svn/tpidp/trunk/

I cannot find this via ViewCVS. Is tpidp not set as a repository root on <http://svn.freepascal.org/cgi-bin/viewvc.cgi/> ?

Tom

E-MAIL: T.Verhoeff @ TUE.NL | Dept. of Math. & Comp. Science PHONE: +31 40 247 41 25 | Technische Universiteit Eindhoven FAX: +31 40 247 54 04 | PO Box 513, NL-5600 MB Eindhoven http://www.win.tue.nl/~wstomv/ | The Netherlands

Reply by email

Marco Ciampa
to Alexey Taran: It seems to be quite old, but fine tutorial: http://www.fp.sdl.de.vu/…
Alexey Taran wrote 5 lines
It seems to be quite old, but fine tutorial: http://www.fp.sdl.de.vu/ <http://www.fp.sdl.de.vu/> > Can someone please point me a simple BGI to SDL howto or some very simple > Fpc SDL tutorials?

Thank you very much...start experimenting!

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

Reply by email

Tiziano De Togni
to Marco Ciampa: Can someone please point me a simple BGI to SDL howto or some very simple Fpc SDL…

Marco Ciampa ha scritto:

Show quoted text 11 lines
On Sat, Jan 05, 2008 at 11:11:02AM +0100, Florian Klaempfl wrote: > Marco Ciampa schrieb: >> I work in a high school in Italy. >> .... >> console & >> graph unit (BGI drivers under windows and Linux (X _not_ VGAlib) ) > If one writes a book, _please_ use SDL for graphics and skip the legacy > graph unit :) Can someone please point me a simple BGI to SDL howto or some very simple Fpc SDL tutorials?

Hi, Marco,

I think that there is not (yet) a good answer to your question.

You can start from here: http://wiki.freepascal.org/FPC_and_SDL

Then you can find documentation about SDL and Free Pascal if you get and install the latest JEDI-SDL v1.0: http://sf.net/projects/jedi-sdl/ (\documentation\html\Using SDL under Free Pascal.htm).

For the graph side of your question, there is a project by Evgeniy Ivanov to port the graph unit on SDL:
http://sourceforge.net/projects/sdlgraph
but it's still in a pre-alfa state.

I am actually working on another perspective.
SDL doesn't have functions to draw pixels, lines, rectangles, arcs, ovals and text on the screen, and the FPC graph sources are the better documentation I found about (there is also SGE, a nice SDL Graphics Extension library in C but there are not headers translated for pascal).

So I made first a little project including the basic Jedi-sdl units (sdl.pas and sdl.inc) in order to work with the Lazarus IDE, then I made a unit with equivalent graph procedures to draw on a SDL surface (SDL_GetPixel, SDL_DirectputPixel, SDL_Line, SDL_Rectangle, SDL_DrawPoly, SDL_FillPoly, SDL_Ellipse, SDL_OutTextXY, etc.).

This demo/test application (some sort of the classic bgidemo app) compiles and works on Windows and Linux (Ubuntu), if you are interested about this work I'll soon make it available on my home page. Keep in mind that it's still work in progress...

It's not (yet) a tutorial, but, as Florian suggested, a practical example about using SDL for graphics with Free Pascal.

tiziano

Reply by email

Marco Ciampa
to Tiziano De Togni
Tiziano De Togni wrote 15 lines
Marco Ciampa ha scritto: > On Sat, Jan 05, 2008 at 11:11:02AM +0100, Florian Klaempfl wrote: >> Marco Ciampa schrieb: >>> I work in a high school in Italy. >>> .... >>> console & graph unit (BGI drivers under windows and Linux (X _not_ >>> VGAlib) ) >> If one writes a book, _please_ use SDL for graphics and skip the legacy >> graph unit :) > Can someone please point me a simple BGI to SDL howto or some very simple > Fpc SDL tutorials? > Hi, Marco, I think that there is not (yet) a good answer to your question.

[...] :-(

Show quoted text 21 lines
I am actually working on another perspective. SDL doesn't have functions to draw pixels, lines, rectangles, arcs, ovals and text on the screen, and the FPC graph sources are the better documentation I found about (there is also SGE, a nice SDL Graphics Extension library in C but there are not headers translated for pascal). So I made first a little project including the basic Jedi-sdl units (sdl.pas and sdl.inc) in order to work with the Lazarus IDE, then I made a unit with equivalent graph procedures to draw on a SDL surface (SDL_GetPixel, SDL_DirectputPixel, SDL_Line, SDL_Rectangle, SDL_DrawPoly, SDL_FillPoly, SDL_Ellipse, SDL_OutTextXY, etc.). This demo/test application (some sort of the classic bgidemo app) compiles and works on Windows and Linux (Ubuntu), if you are interested about this work I'll soon make it available on my home page. Keep in mind that it's still work in progress... It's not (yet) a tutorial, but, as Florian suggested, a practical example about using SDL for graphics with Free Pascal.

First of all, as usual, thanks Tiziano.

These news are very sad. Why? Because we in Italy (but I think, in other countries too) have plenty of math and phisics high school books (and some written very well indeed) that reports Turbo Pascal/BGI examples thanks to the easy way this lib permits to create simple graphs and/or drawings on the screen. The fact that the sdl library is not included by default in the standard fpc package make things worse since students are not skilled enough to compile and/or install packages by themself. If you have to instruct students to install fpc+sdl+other libs perhaps with some manual environment adjustment...just isn't pratically feasible.

So one giant step to improve things could be to create a _easy_ installable win/linux/mac package to enable elementary graph drawing in fpc. The BGI compatibility could be a real plus but I understand could have drawbacks too. Then a tutorial and a BGI to (new graph library name here) howto guide should close the gap.

Theese are the thoughts (perhaps OT sorry but I hope you appreciate the feedback) of a high school technician.

bye

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

Reply by email

Tiziano De Togni
to Marco Ciampa

Marco Ciampa ha scritto:

Show quoted text 11 lines
On Tue, Jan 08, 2008 at 08:54:58AM +0100, Tiziano De Togni wrote: > Marco Ciampa ha scritto: >> Can someone please point me a simple BGI to SDL howto or some very simple >> Fpc SDL tutorials? >> These news are very sad. Why? Because we in Italy (but I think, in other countries too) have plenty of math and phisics high school books (and some written very well indeed) that reports Turbo Pascal/BGI examples thanks to the easy way this lib permits to create simple graphs and/or drawings on the screen. The fact that the sdl library is not included by default in the

...

Theese are the thoughts (perhaps OT sorry but I hope you appreciate the feedback) of a high school technician.

your feedback tells me that I am working in the right direction.

There could be another way to explore, all this could be made using the AggPas Library instead of SDL: no .DLLs, .sos or .dev packages to install, only pascal units... but let's talk about that another day :-)

you can find the zip file here:

http://digilander.libero.it/tizzziano/pagine/brevinotizie.html or, directly, with this direct link:
http://digilander.libero.it/tizzziano/files/sdlgraphex_080108.zip

The main program is sdlgraphex.lpr (Lazarus project) if you don't use the IDE you can compile it with FPC using the comman line in compile.bat. This requires only the SDL.dll (or SDL.so) installed in your system.

that's all, by now.

bye
tiziano

Reply by email