Sign in Join

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

Mailing lists / fpc-pascal / 2005-10

New to the list; Lots of startup questions

6 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

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

David Chandler

Hello,
I am new to the FPC-Pascal list. I programmed in Borland Pascal in the late 1980's and early 1990's including a DOS star mapping program called Deep Space (see http://www.davidchandler.com). I never made the transition to Object Pascal, Delphi, or a Windows environment.

I was wanting to review the list archives, but the link at http://lists.freepascal.org/mailman/listinfo/fpc-pascal appears to be broken. I would appreciate a good link if the archives really exist.

My main problem getting started with FPC has been general logistics operating in a Windows environment. I have an icon to open FPC on my desktop. If I have the programs I am working on in various directories called c:\project1, c:\project2, etc., how do I configure the Options/Directories to look for things in the right places and put compiled code in the right places? Do I need separate icons to open FPC for each working directory?

Also I did a Hello program that put the output in a DOS screen, which flashed off immediately. I got it to stay open by waiting for input using the keypressed function in the CRT unit. Is there some other way?

Where would I read to start learning about producing GUI output? Is there still the distinction between text and graphics modes as in the Turbo Pascal days? Do I need to read up on Delphi to be able to use GUI features in FPC, or are there tutorials for FPC that would get me there directly?

Enough questions for now. Thanks in advance for any help you can give to help me get off the ground.

--David Chandler

Jilani Khaldi
to David Chandler

Hello David,

Show quoted text 8 lines
My main problem getting started with FPC has been general logistics operating in a Windows environment. I have an icon to open FPC on my desktop. If I have the programs I am working on in various directories called c:\project1, c:\project2, etc., how do I configure the Options/Directories to look for things in the right places and put compiled code in the right places? Do I need separate icons to open FPC for each working directory?

use Dev-Pascal IDE
http://www.bloodshed.net/devpascal.html

Also I did a Hello program that put the output in a DOS screen, which flashed off immediately. I got it to stay open by waiting for input using the keypressed function in the CRT unit. Is there some other way?
Just add at the end of the program:
write('Press <Enter> to quit');
readln;
Show quoted text 6 lines
Where would I read to start learning about producing GUI output? Is there still the distinction between text and graphics modes as in the Turbo Pascal days? Do I need to read up on Delphi to be able to use GUI features in FPC, or are there tutorials for FPC that would get me there directly?

See here
http://www.freepascal.org/packages/gtk.html
http://www.lazarus.freepascal.org/

Ciao!

Jilani

L505
to David Chandler: I am new to the FPC-Pascal list. I programmed in Borland Pascal in the late 1980's and…
Also I did a Hello program that put the output in a DOS screen, which flashed off immediately. I got it to stay open by waiting for input using the keypressed function in the CRT unit. Is there some other way?

You can call

 readln;

to pause the program. Also, in windows, you can run

cmd /k myprogram.exe

and it will open a command prompt for you and hold it open if the program crashes or ends.

Marco van de Voort
to David Chandler: I am new to the FPC-Pascal list. I programmed in Borland Pascal in the late 1980's and…
Show quoted text 7 lines
My main problem getting started with FPC has been general logistics operating in a Windows environment. I have an icon to open FPC on my desktop. If I have the programs I am working on in various directories called c:\project1, c:\project2, etc., how do I configure the Options/Directories to look for things in the right places and put compiled code in the right places? Do I need separate icons to open FPC for each working directory?

If you use a systematic directory layout, try adding global search paths as absolutes and directories inside your project dirs as relative paths.

Where would I read to start learning about producing GUI output?

Lazarus is GUI, cross platform Delphi style. Drag and drop a button, double click it, fill the code what you want executed.

Is there still the distinction between text and graphics modes as in the Turbo Pascal days?

Console and GUI now. This is not only console and GUI but also between normal and event driven (though TV textmode programs are closer to the GUI model then to console IMHO)

Do I need to read up on Delphi to be able to use GUI features in FPC, or are there tutorials for FPC that would get me there directly?

Yes, definitely. Simply use Delphi tutorials to get a feel. Lazarus is similar enough to benefit from that.

Nearly everything by Marco Cantu is good, he has a bunch of free ebooks on his site you can start with, and if you can pick up one of his "Mastering Delphi" series books in a dump it is also nice. IIRC they are not even terribly expensive new.

Those are more tutorial like. For more deep knowledge consult delphi manuals and of course the language description part of the quite fine FPC documentation itself.

Michalis Kamburelis
to David Chandler
David Chandler wrote 5 lines
I would like to browse the archives for this list, but the link at http://lists.freepascal.org/mailman/listinfo/fpc-pascal appears to be broken. It sends me to a Microsoft site. Do archives really exist? If so, what is the correct link?

On this page: [http://www.freepascal.org/maillist.html] there are two working links to fpc-pascal archives:
[http://lists.freepascal.org/lists/fpc-pascal/] and

Indeed, when one enters
[http://lists.freepascal.org/mailman/listinfo/fpc-pascal/] there is an unsensible URL
[http://http://lists.freepascal.org/pipermail/fpc-pascal/] (yeah, two "http://"). Corrected version,
[http://lists.freepascal.org/pipermail/fpc-pascal/], is a broken link. If you try to access URL
[http://http//lists.freepascal.org/pipermail/fpc-pascal/] you indeed get redirected to [http://www.microsoft.com/] -- nice joke, I guess that micro$oft registered the name "http" ?

Anyway, someone should correct URL on
[http://lists.freepascal.org/mailman/listinfo/fpc-pascal/] to point to [http://lists.freepascal.org/lists/fpc-pascal/].

Michalis