Standard Compatibility [was: Re: New Alpha]_(re)

Fri, 4 Apr 1997 12:43:21 +0200



Trying to sum up the points of this discussion and adding some of my opinions:

- Both formatting ways have their place. Though programmers are used to one
  of them, I guess in most programs, you'll find places where one way will
  be easier to use, and others where the other way will be preferable.

- In gpc, the switches --standard-pascal/--extended-pascal or --borland-pascal
  should choose the according defaults.

- Additionally, switches like --[no-]clip-strings, --default-width=...,
  --[no-]real-blank change the defaults in these regards.

- There should also be compiler options like {$CLIP+/-}, {$DEFWIDTH 12},
  {$REALBLANK+/-} (?).
  This will be necessary if BP-ish and SP-ish programmers work together on a
  project, and want to build their program with --automake. And it can be
  convenient for a single programmer to change it for different procedures
  (see above).

- The default behaviour without any switches or options can be like standard
  Pascal in this regard. (I'm saying this although I'm coming from BP.)
  Sven, those BP programmers who want to change smoothly to gpc will use
  --borland-pascal anyway, so there should be no problems with this one.

- A way to read in configuration files (like "gpc @gpc.cfg") seems good (in
  addition to environment variables and command line options). Even if gpc
  doesn't read in a config file by default, it should be no problem to set
  an alias accordingly (BTW, even modern DOSes support something like alias
  in the form of DosKey...)

- Putting those flags in a makefile is also an option, but only if one
  is to use makefiles at all. Personally, I don't like makefiles, and I
  think Pascal programs don't need makefiles, since all the dependencies
  between modules are there in the code (unlike C). Therefore, I'd like
  to be able to compile any Pascal program with simply
  "gpc --automake progname.pas". Any compiler options should be in the
  source (at least there should be a way to do so).

  BTW (not quite to this topic): Is there any reason why the default
  output file is called "a.out" (or "a.exe" with DOS) - other than
  historical reasons? Wouldn't it make more sense to default to the
  base filename of the main program, in order to save programmers from
  typing "gpc -o x x.pas"?

- Naming the program gpc, spc, epc and bpc seems like a sensible way for
  Un*x, but on systems that don't support either hard or symbolic links
  (aka DOS), it would mean 4 separate binaries - probably not a good solution
  there (although those DOS users who want to do only Borland style could
  rename gpc.exe to bpc.exe). So this could be one, but not the only, way to
  choose the defaults.

  Note: there would be a difference between gpc (GNU Pascal with all the
  extensions) and spc (standard Pascal only), perhaps not in the question
  of output formatting, but in other regards.
-- 
Frank Heckenbach, Erlangen, Germany
heckenb@mi.uni-erlangen.de
Turbo Pascal:   http://www.mi.uni-erlangen.de/~heckenb/programs.htm
Internet links: http://www.mi.uni-erlangen.de/~heckenb/links.htm


Frank Heckenbach (heckenb@mi.uni-erlangen.de)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es