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