🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #2075

Re: Over-riding ^C termination via TPascal 4.0

#2075
From: Timo Salmi LASK
Date: Fri, 07 Sep 1990 03:27
24 lines
2069 bytes
In article <billq.652551823@s.ms.uky.edu> 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
Technical Details
Message-ID: <1990Sep7.032759.14466@uwasa.fi>
Path: arc1-ca.pugleaf.net!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
References: <billq.652551823@s.ms.uky.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <billq.652551823@s.ms.uky.edu>
Followup-To: comp.lang.pascal
Distribution: comp
Organization: University of Vaasa
Lines: 24