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

Michael Van Canneyt michael at freepascal.org
Sat Dec 7 13:12:13 CET 2019



On Sat, 7 Dec 2019, Sven Barth via fpc-devel wrote:

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

I agree. It's more consistent.

Michael.


More information about the fpc-devel mailing list