GNU Pascal Homepage - gpc - gpc-announce - gpc-de - gpc-doc
Diese Seite auf deutsch

Mail #9345

Back to main page of archive

Previous mail   Next mail   Unformatted/full headers
Overview  10 days   Subject   Date   Thread   Author  

From: Mirsad Todorovac
Subject: Pascal Compiler Help
Date: 9 Sep 2003, 16:36:08

On 9 Sep 2003, Tony Crouch wrote:

> Hi all,
> I'm a beginner to Pascal and also to the linux operating system, i've
> done some C++ programming before and am not wanting to discover my roots
> by relearning some pascal stuff ... just for something different.
>
> My question is in regards to compiling pascal programs, i'm guessing
> that pascal programs can be made with an ordinary plain-text editor with
> the extension .pas.
>
> I'm using Linux Red Hat 8 and i'm guessing that there'd be some among
> you who've had some exposure to C++ (or C) and you'll know that to
> compile a C++ program in Linux you go to terminal (or within your text
> editor ... i.e. emacs or xemacs) and type in g++ example.cpp -Wall -o
> example, where example.cpp is the text file and example is the
> executable file that results from compiling.
>
> Could someone please inform me as to what the command line is to compile
> a pascal program on linux red hat 8.

Hi, Tony,

Finally something easy enough for me to reply - so others would save their
time, and I could be a contributing member of list society ;-)

% cat > hello.pas
program hello(output);
begin
  WriteLn ('Hello, world!')
end.
^D
% gpc -o hello hello.pas

So, it's rather easy, you just replace g++ with gpc, and apply on
corresponding source.

You can use:

% gpc --help

to see a short list of available options, and ``info gpc'' to learn more
about gpc options, compiler itself and language.

Mirsad

Previous mail   Next mail   Unformatted/full headers
Overview  10 days   Subject   Date   Thread   Author  


In reply to

Author Subject Date
Tony Crouch Pascal Compiler Help 9 Sep 2003, 00:02:24

Back to main page of archive


Note: This page contains information that does not originate from the owner of this web site, but from the authors of the mails archived. The owner of this web site is not responsible for the content of such information. Any use of that infomation requires the consent of the respective author.

Where WWW addresses (URLs) in the mails archived are marked as hyperlinks, this is only for the comfort of the reader. The content of the web pages linked to like this does not necessarily reflect the opinion of the owner of this web site or of the authors of the mails archived. The owner of this web site is not responsible for the content of such web pages. Those pages are explicitly not to be considered as part of the content of this page, but merely as references.


This page was created by Crystal 0.999 (Linux 2.4.27/i686).