Re: [fpc-pascal] Procedure types

2008-12-20 Thread Mark Morgan Lloyd
leledumbo wrote: FPC treats procedural types a little different from Delphi / TP, see http://www.freepascal.org/docs-html/ref/refse17.html this . You can therefore write your AddressOf function as: FUNCTION AddressOf(VAR x): POINTER; ... // variables (if you ever need) begin {$ifdef fpc}

Re: [fpc-pascal] Procedure types

2008-12-20 Thread Michael Van Canneyt
On Fri, 19 Dec 2008, Mark Morgan Lloyd wrote: I've got a few thousand lines of Pascal which I'm converting to FPC. It's actually the Meta-2 compiler-compiler which despite its age I still find useful for embedded script processing, I hope eventually to get it running on SPARC and possibly

Re: [fpc-pascal] Procedure types

2008-12-20 Thread Mark Morgan Lloyd
Michael Van Canneyt wrote: Is there a directive or mode that will allow a procedure variable to be compatible with AddressOf() as defined? Alternatively is there a type which is compatible with any procedure variable (i.e. like Modula-2's PROC, if my memory is correct), and can I overload

Re[2]: [fpc-pascal] Procedure types

2008-12-20 Thread JoshyFun
Hello Mark, Saturday, December 20, 2008, 1:40:15 PM, you wrote: MML Already am using (*$MODE DELPHI *) Hmmm... this should be {$MODE DELPHI} do not ? using (* *) you get a comment, or maybe I'm wrong ? In Delphi mode you must not need the @ for procedural assigns. -- Best regards, JoshyFun

Re: [fpc-pascal] Procedure types

2008-12-20 Thread Mattias Gaertner
On Sat, 20 Dec 2008 16:21:45 +0100 JoshyFun joshy...@gmail.com wrote: Hello Mark, Saturday, December 20, 2008, 1:40:15 PM, you wrote: MML Already am using (*$MODE DELPHI *) Hmmm... this should be {$MODE DELPHI} do not ? using (* *) you get a comment, or maybe I'm wrong ? In Delphi

Re: [fpc-pascal] Procedure types

2008-12-20 Thread Mark Morgan Lloyd
Mattias Gaertner wrote: On Sat, 20 Dec 2008 16:21:45 +0100 JoshyFun joshy...@gmail.com wrote: Hello Mark, Saturday, December 20, 2008, 1:40:15 PM, you wrote: MML Already am using (*$MODE DELPHI *) Hmmm... this should be {$MODE DELPHI} do not ? using (* *) you get a comment, or maybe I'm

Re: [fpc-pascal] Procedure types

2008-12-20 Thread Mattias Gaertner
On Sat, 20 Dec 2008 17:00:37 + Mark Morgan Lloyd markmll.fpc-pas...@telemetry.co.uk wrote: Mattias Gaertner wrote: On Sat, 20 Dec 2008 16:21:45 +0100 JoshyFun joshy...@gmail.com wrote: Hello Mark, Saturday, December 20, 2008, 1:40:15 PM, you wrote: MML Already am using

[fpc-pascal] Procedure types

2008-12-19 Thread Mark Morgan Lloyd
I've got a few thousand lines of Pascal which I'm converting to FPC. It's actually the Meta-2 compiler-compiler which despite its age I still find useful for embedded script processing, I hope eventually to get it running on SPARC and possibly ARM as well as x86. Linux will not be the first OS

Re: [fpc-pascal] Procedure types

2008-12-19 Thread leledumbo
FPC treats procedural types a little different from Delphi / TP, see http://www.freepascal.org/docs-html/ref/refse17.html this . You can therefore write your AddressOf function as: FUNCTION AddressOf(VAR x): POINTER; ... // variables (if you ever need) begin {$ifdef fpc} AddressOf:=...@x;