Re: [fpc-pascal] static class methods

2008-02-06 Thread Jonathan Benedicto
Micha Nelissen: What are "static" class methods? From RAD Studio 2007's Help file on Methods (ms-help://borland.bds5/devcommon/methods_xml.html): Like class methods, class static methods can be accessed without an object reference. Unlike ordinary class methods, class static methods have no

Re: [fpc-pascal] static class methods

2008-02-06 Thread Micha Nelissen
Jonathan Benedicto wrote: > Jonas Maebe wrote: >> I'm not sure how Delphi could handle this without passing the VMT as >> invisible parameter (and from a cursory look at the code generated by >> Kylix, it does appear to pass the VMT). > > Delphi doesn't allow static class methods to be virtual.

[fpc-pascal] FPC for virtual machines?

2008-02-06 Thread Marco Alvarado
Hello! I'm in the Lazarus list, but I'm new to this one. Are there FPC versions for these virtual machines? Java Flash 8 (actionscript 2) Flash 9 (actionscript 3) If the answer is no, I'd love to create compilers for those virtual platforms. I want to see Pascal applications running on them. :D

Re: [fpc-pascal] static class methods

2008-02-06 Thread Jonathan Benedicto
Jonas Maebe wrote: I'm not sure how Delphi could handle this without passing the VMT as invisible parameter (and from a cursory look at the code generated by Kylix, it does appear to pass the VMT). Delphi doesn't allow static class methods to be virtual. Jon

Re: [fpc-pascal] static class methods

2008-02-06 Thread Jonas Maebe
On 06 Feb 2008, at 20:52, Jonathan Benedicto wrote: Why do static class methods in FPC have a "Self" parameter? In Delphi, static class methods do not have a Self parameter. You need them to correctly handle cases like this: *** {$ifdef fpc} {$mode delphi} {$endif} type tc = class c

[fpc-pascal] static class methods

2008-02-06 Thread Jonathan Benedicto
Why do static class methods in FPC have a "Self" parameter? In Delphi, static class methods do not have a Self parameter. Jon ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] EControlC exception

2008-02-06 Thread Jonas Maebe
On 06 Feb 2008, at 11:27, Michael Van Canneyt wrote: You can catch this signal using a signal handler: PROGRAM ExControlC; (* How to capture [Ctrl+C] in Object Pascal. *) {$mode objfpc}{$H+} USES SysUtils,baseunix; procedure term(sig :longint);cdecl; begin Writeln('Interrupt caught')

Re: [fpc-pascal] EControlC exception

2008-02-06 Thread Michael Van Canneyt
On Wed, 6 Feb 2008, Guillermo Martínez Jiménez wrote: > Hi. > > Recently I discovered that Delphi can detect [Ctrl]+C keys using the > EControlC exception. I was curious so I decided to test it in Linux > using Free Pascal. The program I wrote: > _ > > PROGRAM E

[fpc-pascal] EControlC exception

2008-02-06 Thread Guillermo Martínez Jiménez
Hi. Recently I discovered that Delphi can detect [Ctrl]+C keys using the EControlC exception. I was curious so I decided to test it in Linux using Free Pascal. The program I wrote: _ PROGRAM ExControlC; (* How to capture [Ctrl+C] in Object Pascal. *) {$mode objfp

Re: [fpc-pascal] Lazarus with FPC 2.3.1 i386 Mac OSX

2008-02-06 Thread Jonas Maebe
On 05 Feb 2008, at 13:45, Wanderlan Santos dos Anjos wrote: Use the compiler command line option -CPPACKSET=1 or source directive {$PACKSET 1} for Delphi compatibility in Set sizes. This works in 2.3.1 and 2.2.0. It contains several bugs in 2.2.0 though and it's not advisable to use it t

Re: [fpc-pascal] Lazarus with FPC 2.3.1 i386 Mac OSX

2008-02-06 Thread Wanderlan Santos dos Anjos
Use the compiler command line option -CPPACKSET=1 or source directive {$PACKSET 1} for Delphi compatibility in Set sizes. This works in 2.3.1 and 2.2.0. I use too {$Z1} or {$PACKENUM 1} for Delphi compatibility in enumerated sizes. Curiously, and sadly, these options are not automatically attribute