[fpc-pascal]FPC vs. GPC (was:FPC 1.0.6 and open arrays)

James Mills prologic at prologitech.com
Tue Jan 28 14:06:53 CET 2003


On Tue, Jan 28, 2003 at 12:05:28PM +0100, Andreas K. Foerster wrote:
> 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.
Try writing a compiler first instead of complaining about FPC's syntax
:)

You are toying with the issue of syntax. There is nothing wrong with
FPC's syntax, it's quite compatible with standard pascal and I disagree
with most of what you say above. FPC to my knowledge was created as an
alternative to Borland Pascal which only supported the 16-bit PC
architecture. We need a pascal compiler to support 32bit.

> 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)

What on earth would we want a more typed language ? Pascal is stongly
typed enough as it is, and is quite comfortable to use. People like
myself that have been using pascal for many many years will not be happy
to find that pascal now has a new syntax.

cheers
James

> 
> -- 
> Tschuess
> 	Andreas
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal



More information about the fpc-pascal mailing list