Gpc not accepting non-standard (?) systax._(re)

Mon, 20 Oct 1997 17:14:59 +0200


 
richard.kerry@quantel.com wrote:

> The 'C' directive on external procedures.
> 
> FUNCTION _p_paramcount : Integer; C;
> EXTERNAL ;
> FUNCTION _p_paramstr (num: Integer; VAR str: String): Boolean; C;
> EXTERNAL ;
> 
>     It says :
>           : parse error before `External'
 
The "C" directive implies "external". Earlier GPCs have accepted the
above, the newer versions don't anymore. Just using "C" should do
what you want. (Apart from this, there are still plans to make a
more consistent syntax for C/External/AsmName... sometime...)

> If I comment these out it fails on a structured constant definition using
> 'value'.
> 
>    type
>       ArgDefs = ArgDefTable value (
>         (('                ',  1,  0), 0, OptionalArg, NullArg),
>          etc...
> 
>     It says :
>           : parse error before `Value'
>           : invalid schema discriminants
> 
>  If I comment out 'value' it says
>          : parse error before `,'
>          : missing expression
>          : discriminated type is not a schema or string
>          : parse error before `,'
> 
> Is there some configuration I need to do to make these work ? Or have I
> found a bug ?

If ArgDefTable is an array or record (or a combination of these), this
is a known problem (since I don't know if this is required by the
standard, I'm not sure if it's a bug or just a missing feature ;-).
It's listed in my To-Do list at
http://www.mi.uni-erlangen.de/~heckenb/gpc-todo_toc.html
in the section "Records/arrays".

If, however, a schema type is involved (the error messages say
something about these), it might help to see the declaration of
ArgDefTable. Did you perhaps use "string" without a maximum length?

-- 
Frank Heckenbach, Erlangen, Germany
heckenb@mi.uni-erlangen.de
http://home.pages.de/~fjf/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