🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: pl.comp.lang.pascal
2 messages
2 total messages Started by webmajsterek Wed, 23 Mar 2011 08:41
Przeciazanie jak w delphi
#93155
Author: webmajsterek
Date: Wed, 23 Mar 2011 08:41
16 lines
1341 bytes
właśnie odkryłem ze fpc 2.5.1  ma możliwośc przeciążania jak  w delpi 
operatorów  dla rekordów .

{$Mode Delphi}

type
  R = record
    F: Integer;
    class operator Implicit(const v: integer): R;
    class Operator Explicit(const v: R ): integer;
  end;  



-- 
Wysłano z serwisu OnetNiusy: http://niusy.onet.pl
Re: Przeciazanie jak w delphi
#93156
Author: Wiktor S.
Date: Thu, 24 Mar 2011 22:34
19 lines
1375 bytes
> właśnie odkryłem ze fpc 2.5.1  ma możliwośc przeciążania jak  w delpi
> operatorów  dla rekordów .
>
> {$Mode Delphi}
>
> type
>  R = record
>    F: Integer;
>    class operator Implicit(const v: integer): R;
>    class Operator Explicit(const v: R ): integer;
>  end;


szkoda że twórcy Delphi kompletnie ignorują Free Pascala, za każdym razem 
wymyślając własną składnię, nawet jesli w FPC coś było wcześniej.


-- 
Azarien
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads