[fpc-pascal] Re: Linked list constant
Martin Schreiber
mse00000 at gmail.com
Tue Mar 19 09:56:16 CET 2013
On Tuesday 19 March 2013 09:38:43 Sven Barth wrote:
> >
> > Delphi has {$J-} in order to set them readonly.
>
> Do you know whether Delphi has by default $J+ or $J-?
>
{$J+} in Delphi 7.
> > Another problem with Free Pascal in this context is that it is AFAIK not
> > possible to define forward types which could be used as parameters for
> > procedures used as procedure variables in later type definitions.
>
> In case of records, classes and objects you can work around this with
> nested types (Note: for records the modeswitch advancedrecords is
> required in non-Delphi modes):
>
> === code begin ===
>
> type
> TMyRecord = record
> public type
> TTest = procedure(aRec: TMyRecord);
> public var
> Test: TTest;
> end;
>
> === code end ===
>
Ouch! ;-)
Martin
More information about the fpc-pascal
mailing list