Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Pascal on system X

30 views
Skip to first unread message

Peter

unread,
Jun 24, 2004, 4:11:48 AM6/24/04
to
Hello,

Merlijn is a softwaredeveloper for administrative software for the
Macintosh. From the beginning we have relied on CodeWarrior and have
over the years developed a very large codebase and several elaborate
projects.

Since the release of Mac OS Jaguar we have looked for a way to switch to
a new language, because new versions of CodeWarrior don't have official
support for Pascal. The Pascal plugin has helped us to extend our use of
the Pascal codebase we have, but with recent versions even that seems
out of the question.

Now we have two questions :
- is there anywhere a reliable Pascal developmentsystem for the Mac, we
could use for the next years ?
- What can we do to migrate to a new language? C or C++ ? Also we would
like to be Cocoa native this time, and not rely on the Carbon stuff anymore.

We tried some P2c solutions a few years ago, but none of then worked real
good.

As we are a small developer we would like to avoid long conversion times
as much as we can. Are there any other tools that would help us convert our
Pascal Code to say, C code?

Any suggestions/ help/ comments are more than welcome.

Kind regards,

Peter Haas
Merlijn Automatisering B.V. The Netherlands.

Jonathan Hoyle

unread,
Jun 24, 2004, 9:13:49 PM6/24/04
to
> Now we have two questions :
> - is there anywhere a reliable Pascal developmentsystem for the Mac, we
> could use for the next years ?

This has been a long standing problem, I'm sorry to say. Pascal is a
great language, but unfortunately, it is so similar to C that people
have simply moved onto that...not necessarily because C is better (it
certainly is in some things, not in others), but because the
marketshare for C has been so dominant. 10 years ago, when Symantec
was pocket-vetoing Think Pascal, Metrowerks came to the rescue and
continued to support it. Now they have found that the market doesn't
seem to bear it out any longer.

Since I too have since kicked the Pascal habit, I have not had any
experience with it, but the only one I am aware of is GNU Pascal for
Mac OS X: http://www.microbizz.nl/gpc.html .


> - What can we do to migrate to a new language? C or C++ ? Also we would
> like to be Cocoa native this time, and not rely on the Carbon stuff anymore.

Cocoa would require you to switch to Objective-C. A much easier
transition (so it would seem to me) is Carbon using C. However, if
you are ready to make a clean break to a brand new API and a brand new
language all at the same time, then the entire Mac development world
is open to you.

I would strongly urge you to consider RealBasic. It is very powerful,
easy to use and cross-platform. hard to beat that combination.


> We tried some P2c solutions a few years ago, but none of then worked real
> good.
>
> As we are a small developer we would like to avoid long conversion times
> as much as we can. Are there any other tools that would help us convert our
> Pascal Code to say, C code?
>
> Any suggestions/ help/ comments are more than welcome.

If p2c didn't work for you, I would recommend simply making the
conversion from Pascal to C manually. 80% of your Pascal code will
have a 1 to 1 line conversion going to C. Certain data types, such as
sets, will require more work (usually converted to bit flags in C),
but your Carbon calls will remain essentially the same.

How many lines of code are we talking about here?


Jonathan Hoyle
Gene Codes Corporation

Scott Moore

unread,
Jun 25, 2004, 1:13:30 AM6/25/04
to
Jonathan Hoyle wrote:

>>Now we have two questions :
>>- is there anywhere a reliable Pascal developmentsystem for the Mac, we
>>could use for the next years ?
>
>
> This has been a long standing problem, I'm sorry to say. Pascal is a
> great language, but unfortunately, it is so similar to C that people
> have simply moved onto that...not necessarily because C is better (it
> certainly is in some things, not in others), but because the

Ive heard the argument that C == Pascal before. All I can say is if you
don't see the difference, then you should probally be using C. To me,
Microsoft itself has been advertising the difference between C and Pascal,
even though they don't know it. C# (and Java) can be "verified" to be
safe because of "managed pointers", where as C cannot. What are
"managed pointers" ? Simply pointers which are only allowed to point
to the dynamic storage area, and not to an arbitrary local or global
variable. Pascal has had that property since day one.

The principle similarity between Pascal and C is that they operate on
similar types of data (integers, floats, structures, no built in strings,
no built in lists), and have syntax vaguely similar to Algol.

From there the differences abound. Pascal is type safe, C is type wild,
Pascal is verbose, C is terse, Pascal is sparse of operator and constructs,
C is operator and construct verbose, Pascal is strict structural, C
is loose structural (lots of "break" and "continue" type exceptions to
strict program structure). Pascal makes constants part of the program,
C makes constants part of the macro preprocessor.

None of this is meant to add fuel to the "my language is better" argument,
just that they are not indentical languages or design phylosophies.
People who like Pascal for its cleanlyness and type safety are interested
in Pascal, not C.

> marketshare for C has been so dominant. 10 years ago, when Symantec
> was pocket-vetoing Think Pascal, Metrowerks came to the rescue and
> continued to support it. Now they have found that the market doesn't
> seem to bear it out any longer.

Symantec and Metrowerks are not all that was happening. There are other
players coming to take their place. GPC is one, IP Pascal is another.
And that is just standard (original) Pascal. The Borland dielect is
still there and strong, and the FPC folks have been making good strides
towards Mac. While I don't personally use Borland because it is not
actually Pascal, those users still represent a considerable interest
group of Pascal.

>
> Since I too have since kicked the Pascal habit, I have not had any
> experience with it, but the only one I am aware of is GNU Pascal for
> Mac OS X: http://www.microbizz.nl/gpc.html .

See:

http://www.moorecad.com/standardpascal

For a list of ISO 7185 compatible compilers.

In short, there is no reason to "dump" Pascal. If your body of source
is in Pascal, and you like Pascal, I would not feel the need to change.
If you are really worried about "the end of the world" for Pascal, you
can change all your Pascal code to C (or whatever) later when the
end of the world really comes. Until then, you can use Pascal, and
by the end of the world, change to whatever language is popular then
(perhaps not C).

--
Samiam is Scott A. Moore

Personal web site: http:/www.moorecad.com/scott
My electronics engineering consulting site: http://www.moorecad.com
ISO 7185 Standard Pascal web site: http://www.moorecad.com/standardpascal
Classic Basic Games web site: http://www.moorecad.com/classicbasic
The IP Pascal web site, a high performance, highly portable ISO 7185 Pascal
compiler system: http://www.moorecad.com/ippas

Being right is more powerfull than large corporations or governments.
The right argument may not be pervasive, but the facts eventually are.

H

unread,
Jun 25, 2004, 10:32:36 AM6/25/04
to
TO follow up on this, is there a way to get gpc to work with Xcode ? So
far I have only used gpc in a shell, IDE could be nice.

Thks,

H

Ron Drake

unread,
Jul 3, 2004, 11:03:04 PM7/3/04
to
In article <1gfxj5h.cxnouj1q6l0meN%Har...@no-log.org>,
Har...@no-log.org (H) wrote:

http://www.microbizz.nl/gpc.html

--
*******************************************************************
http://www.coffeemac.com
*******************************************************************

Marco van de Voort

unread,
Jul 4, 2004, 6:38:26 AM7/4/04
to
On 2004-06-25, Scott Moore <sam...@moorecad.com> wrote:

> The Borland dielect is
> still there and strong, and the FPC folks have been making good strides
> towards Mac.

Both Mac OS X and Classic Mac btw. Though Classic Mac is less finished than
Mac OS X (and is meant to be crosscompiled from Mac OS X from now)

The Mac OS X latest release (1.9.x beta series) is here:
http://freepascal.stack.nl/down2-macosx-powerpc.html

Nearly all FPC on Unix features and libs are also supported on Mac OS X, but keep
in mind this is the first formal release.

There are no releases for Classic Mac yet, mail Olle if you want to play
or help with it. (address on page below)

FPC on Mac status page:
http://freepascal.stack.nl/fpcmac.html#TargetDarwin


RMW 3

unread,
Jul 15, 2004, 8:53:09 PM7/15/04
to

Nicely developed thoughts - thanks for sharing that.

How about C# ? It was developed by the same person
who developed Turbo Pascal and Delphi
( Andres Heilsberg or close to that - spelling might be off).

Do you think that C# and pascal (eg, Delphi) are first cousins?
The "portions" of books I have read about C# make it sound
an awful lot like Delphi (I have been programming with Delphi
for several years ... and I feel certain that Borland will be around
for a while - maybe not till the "end of the world" )

Bob in Atlanta
______________________________

"Scott Moore" <sam...@moorecad.com> wrote in message
news:ZvOCc.106871$Sw.76180@attbi_s51...

0 new messages