Some new features_(re)

Wed, 2 Jul 1997 16:06:48 +0200 (MET DST)


According to Frank Heckenbach:
> According to myself (Peter Gerwinski):
> > What about extending (*$executable-file-name="foo"*) to accept
> > a directory?  Or else (*$executable-path-name="/foo"*) and
> > (*$object-path-name="/bar"*)?
> 
> I don't agree. The *name* of the executable can be considered part of the
> program. The *path* where it will be stored will be system dependent, so the
> path, IMHO, does not belong into the source, but on the commandline (or into
> a (system or user or project specific) config file, of course).

A directive (*$Foo="Bar"*) is always equivalent to a command-line
option `--foo="Bar"'.  I was just thinking about reasonable names
for these options.

> > > - Passing the actual size for untyped (resp. void) parameters, so it can
> > >   be access with sizeof.
> 
> var x:void  -> like C
> var/const x -> like BP

BP does *not* pass the size of untyped parameters to the procedure.
Changing GPC would break compatibility to both C and BP; the latter
being unimportant because nobody will consider it a feature *not*
to have the size of a variable.  OTOH, many C libraries rely on a
`void*' parameter *not* being followed by a `size' parameter.

Instead of changing the meaning of `Var foo', we are IMHO better off
when introducing a *safe* mechanism to pass variables of varying type
(and number).  Procedure overloading will be "half the rent". ;-)

> For procedural variables, BP uses "@ProcVar" to cast them into a pointer(!!!).
> gpc does not understand this, but the (more logical, IMHO) "Pointer(ProcVar)".
> Unfortunately, BP doesn't accept the latter, so AFAICS there's yet no way that
> works on both. :-( Since we can't change BP, we should make gpc recognize
> "@ProcVar", perhaps also only in "--borland-pascal".

Okay; I have put it on my list.

Plan:  Recognize it, but warn.  With `--borland-pascal' (same as
(*$borland-pascal*) :-), don't warn.

Greetings,

    Peter

 Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer
peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201]
 maintainer GNU Pascal [970624] - http://home.pages.de/~gnu-pascal/ [970125]


Peter Gerwinski (peter@agnes.dida.physik.uni-essen.de)

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