[fpc-pascal]FPC vs. GPC (was:FPC 1.0.6 and open arrays)
Andreas K. Foerster
akf1 at AKFoerster.de
Tue Jan 28 12:05:28 CET 2003
On Mon, Jan 27, 2003 at 10:42:37PM +0100, Marco van de Voort wrote:
> > Will there also be sopport for conformant Arrays as they are defined
> > in standard Pascal (ISO-7185)?
>
> Not that I'm aware of (unless you plan to implement it ? ).
No, I can't do it.
The point is just, that I'm still disappointed that FPC isn't
compatible to any of the official Pascal standards and that it's not
even trying to become compatible.
I'm very much drawn back and forth between FreePascal and GNU Pascal.
Both have their advantages, but also their disadvantages. FreePascal
has more commands, but GNU Pascal knows a much more elaborated syntax.
FreePascal supports just one dialect, GNU Pascal knows different
dialects including the standards. FreePascal has lots of systemspecific
extentions, but programs written with them aren't portable,
even not between the different variants of FreePascal itself.
GNU Pascal tries to leave systemspecific things away, that means that
programs are nearly always portable, but also that things are missing.
GNU Pascal (the compiler itself) is very portable, while FreePascal is
mainly targeted to PCs and porting to other platforms seems to take a
lot of time. On the other hand GNU Pascal is hard to install,
especially on non-Unix systems. GNU Pascal is the better Pascal, when
you look at the source code of your programming, but FreePascal is the
better compiler, when you look at the binary that comes out...
What I really want would be a mixture of both!
At the moment I try to use only what both have in common. But
unfortunately that's not much. I have to avoid commands because of
GPC and I have to use a simpler syntax because of FPC.
That's why I try to suggest that FPC should become more standard
compatible, to be able to write more portable code.
Okay, I see that it's difficult to implement.
But what about things that look similar?
For example initialized variables...
FPC has this syntax:
const i: integer = 0;
But it's so very unlogical to use a "const" as variable. :-(
(GPC accepts this syntax, but gives a warning)
Extended Pascal (ISO-10206) declares this syntax:
var i: integer value 0;
Much nicer, isn't it?
That at least looks very similar so I hope, at least that will be
simpler for you to implement...
BTW. you might wonder why Extended Pascal uses "value" and not the
equal-sign. That is because it also defines initialized types:
type myint = integer value 0;
so that all variables that use this type are initialized.
Here a second equal-sign would look strange.
Or what about String definitions:
FPC:
var s: string[255];
ISO-10206:
var s: string(255); {btw. not limited to 255}
Would it be so difficult to accept parantheses instead of brackets?
GPC accepts both.
--
Tschuess
Andreas
More information about the fpc-pascal
mailing list