Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2008-07

Delphi mode

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Carsten Bager

Is there another way writing this without activating Delphi mode.

Carsten

type
  tKeypressed=function:boolean;
Var
pKeypressed:tKeypressed;
Function Keypressed:boolean;
Implementation
Function Keypressed:boolean;
Begin
  if pointer(pKeypressed)nil then
    Keypressed:=pKeypressed
  else Keypressed:=false;
End;
Joao Morais
to Carsten Bager
Carsten Bager wrote 18 lines
Is there another way writing this without activating Delphi mode. Carsten type tKeypressed=function:boolean; Var pKeypressed:tKeypressed; Function Keypressed:boolean; Implementation Function Keypressed:boolean; Begin if pointer(pKeypressed)nil then Keypressed:=pKeypressed
Changing to Keypressed := pKeypressed() ?
else Keypressed:=false; End;

Joao Morais