[fpc-pascal] Different behaviour between FPC 2.6.4 and FPC 3.0.4

Alexander Grotewohl alex at dcclost.com
Tue May 5 22:27:12 CEST 2020


my original suggestion and then

function proc_bool : boolean;

what exactly are you trying to accomplish?

--
Alexander Grotewohl
https://dcclost.com
________________________________
From: fpc-pascal <fpc-pascal-bounces at lists.freepascal.org> on behalf of Rainer Stratmann <rainerstratmann at t-online.de>
Sent: Tuesday, May 5, 2020 4:20:11 PM
To: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
Subject: Re: [fpc-pascal] Different behaviour between FPC 2.6.4 and FPC 3.0.4

Am Dienstag, 5. Mai 2020, 22:14:09 CEST schrieb Alexander Grotewohl:
> procvar:=@proc_bool; ?

Error: Incompatible types

> --
> Alexander Grotewohl
> https://dcclost.com
>
> ________________________________
> From: fpc-pascal <fpc-pascal-bounces at lists.freepascal.org> on behalf of
> Rainer Stratmann <rainerstratmann at t-online.de> Sent: Tuesday, May 5, 2020,
> 4:05 PM
> To: FPC-Pascal users discussions
> Subject: [fpc-pascal] Different behaviour between FPC 2.6.4 and FPC 3.0.4
>
> Compiled with FPC 3.0.4 there is an access violation when executing procvar;
> Compiled with FPC 2.6.4 it works for a long time.
>
> Did I overlooked something?
>
> Mode: MObjFPC
>
> type
>  t_funcboolean = function : boolean;
> var
>  procvar : t_funcboolean;
>
> function proc_bool : t_funcboolean;
> begin
> end;
>
> begin
>  procvar := proc_bool;
>  procvar; // -> access violation with FPC 3.0.4
>
>
>
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal




_______________________________________________
fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20200505/a9d2891a/attachment.htm>


More information about the fpc-pascal mailing list