Xref: utzoo comp.os.msdos.programmer:835 comp.lang.pascal:4071 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!news.funet.fi!uwasa.fi!ts From: ts@uwasa.fi (Timo Salmi LASK) Newsgroups: comp.os.msdos.programmer,comp.lang.pascal Subject: Re: Over-riding ^C termination via TPascal 4.0 Message-ID: <1990Sep7.032759.14466@uwasa.fi> Date: 7 Sep 90 03:27:59 GMT References: Followup-To: comp.lang.pascal Distribution: comp Organization: University of Vaasa Lines: 24 In article billq@ms.uky.edu (Billy Quinn) writes: >Is there any way I can compile a program written in pascal (Turbo PASCAL) >version 4.0, so that the program won't terminate with the ^C or ^[break] >keys? It's seems that other versions of TPascal have compiler directives >to do such a thing but for some reason, version 4.0 does not accept these >compiler directives. Other programmers have told me of an un-documented >command called 'cbreak' whic is supposed to be set to 'true' to control >this sort of thing, however, I connot get this to work either. Any help >will be greatly appreciated! This is one of the most frequently asked questions about TP. The statement about TP 4.0 not having this feature is false. Just take a look at your TP 4.0 manual for the CheckBreak keyword. And, it is not a compiler directive but a predefined constant that can be set true (default) or false. If it is false, you can capture ^C and the break key by testing if ReadKey returns a #3. (CBreak is an obsolete Turbo Pascal version 3 keyword). Also note that in order to be able to use CheckBreak, you'll have to include the Crt unit in your uses statement. I hope this helps you in the right direction. ................................................................... Prof. Timo Salmi (Moderating at anon. ftp site 128.214.12.3) School of Business Studies, University of Vaasa, SF-65101, Finland Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun