[fpc-devel] C-block reference syntax (blocker for 3.2)

Sven Barth pascaldragon at googlemail.com
Sat Dec 7 12:26:12 CET 2019


Am 07.12.2019 um 10:28 schrieb Jonas Maebe:
>
>> If there is a consensus that this is a blocker, I am ready to do the
>> work ASAP. provided we select the syntax. Personally, I am inclined
>> towards these three:
>>     type M = procedure (const N: Integer) with var;
>>     type M = procedure (const N: Integer) cblock;
>>     type M = reference to procedure (const N: Integer) c;
>
> I would prefer type M = reference to procedure (const N: Integer) cblock;
>
> It's weird that unlike with plain procvar type declarations, there's 
> no semicolon between the end of the signature and the calling 
> convention modifier though. Or is that merely a Delphi syntax thing?
I just tested in Delphi: it chokes on the semicolon for reference 
variables, but allows it for normal proc-/methodvars... *sigh*

I'd say we should allow the semicolon as well so that it is more common 
with proc- and methodvars (would probably be easier anyway, cause it 
could then use the normal parse_proc_directives or more importantly 
procvar_dec as I suggested in the other mail).

Regards,
Sven


More information about the fpc-devel mailing list