Sign in Join

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

Mailing lists / fpc-pascal / 2007-11

Help getting started with FPC

8 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Edward Kearns

I am new to FPC, and can't get started. I have used Think Pascal, and I seem to have quite a hurdle here. Someone else told me that I need to start XCode first. I did that, then I chose a template (FPC Carbon Application 2.2.0). Then I didn't know how to enter code, so I opened start.pas, entered some code, tried to do "build and run," "compile," and none of these ran my simple code. what am I missing?

Ed

Chris Kirkpatrick
to Edward Kearns

I suggest you look at the FPC/Lazarus Wiki
http://wiki.freepascal.org/
for ideas to get you started.

It may be easier to start programmng using either the FPC IDE which comes with the FPC package, or the Lazarus IDE which can be used either to produce Windowed GUI applications or simple Pascal console-mode programs.

The FPC manuals at
http://www.freepascal.org/docs.html
contain a lot of information to get you going

You will find the FreePascal/Lazarus community very supportive, eg in this mailing list. I have very rarely seen the comment 'RTFM', though people very often offer links to suitable places to get information.

Hope this helps
Regards - Chris

Edward Kearns wrote 12 lines
I am new to FPC, and can't get started. I have used Think Pascal, and I seem to have quite a hurdle here. Someone else told me that I need to start XCode first. I did that, then I chose a template (FPC Carbon Application 2.2.0). Then I didn't know how to enter code, so I opened start.pas, entered some code, tried to do "build and run," "compile," and none of these ran my simple code. what am I missing? Ed _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Jonas Maebe
to Edward Kearns: I am new to FPC, and can't get started. I have used Think Pascal, and I seem to have…
Edward Kearns wrote 7 lines
I am new to FPC, and can't get started. I have used Think Pascal, and I seem to have quite a hurdle here. Someone else told me that I need to start XCode first. I did that, then I chose a template (FPC Carbon Application 2.2.0). Then I didn't know how to enter code, so I opened start.pas, entered some code, tried to do "build and run," "compile," and none of these ran my simple code. what am I missing?

Xcode /is/ a quite complex environment, and there is no quick "do this and you can do everything you want with Xcode" document, only the slower "experiment and read its documentation" way.

If you want something more akin to Think Pascal, you may want to try LWP, which is available here:
http://sourceforge.net/projects/lightweight-ide

Jonas

Jonas Maebe
to Edward Kearns
Edward Kearns wrote 7 lines
> If you want something more akin to Think Pascal, you may want to > try LWP, which is available here: > http://sourceforge.net/projects/lightweight-ide I did try LWP, and when I opened New Skel, and Compiled, and Ran, all I got were error message.

Which error message?

Where do I go to create my main file in LWP?

Anywhere you want. Just make sure it starts with a program header (such as "program helloworld;").

Jonas

Edward Kearns
> Where do I go to create my main file in LWP?

Anywhere you want. Just make sure it starts with a program header (such as "program helloworld;").

Jonas>>

Here's what I wrote:

Program HelloWorld;
begin

print "hello"

end.

and I'm told

No main program found. Can not build.

What extension do I need on it?

Ed

Jonas Maebe
to Edward Kearns
Edward Kearns wrote 6 lines
Program HelloWorld; begin print "hello" end.

Note that the above is not a valid Pascal program. This is the correct version:

Program HelloWorld;
begin
   writeln('hello');
end.
Show quoted text 5 lines
and I'm told No main program found. Can not build. What extension do I need on it?

.p, .pas or .pp

Jonas

Edward Kearns
>

Note that the above is not a valid Pascal program. This is the correct version:

Program HelloWorld;
begin
   writeln('hello');

end.>>

Thank you, thank you! I had a case of the dumbs, mixing languages. I was about ready to give up and redo my Think Pascal program in Basic, since I thought I would never be able to get started in this.

Thanks again!

Ed