[comp.lang.pascal] Pascal problem

Jason_Joshua_Irwin@cup.portal.com (06/07/89)

I am trying to write a pascal program using Turbo 4.0 . The program works fine
but I want the user not to be able to exit with a control break. Is there 
any way I can cut the control break key off? Any help would be welcomed very
much.
                    Thanks in advance,
                              -Jason
 
 

snuzs@trsvax.UUCP (06/08/89)

	This can do done quite easily.  I wish I could remember the right
	syntax, but if you have a TP4 manual handy, It wouldn't be hard to
	find.  There is a boolean variable in the DOS unit which when set
	to false, disables Ctrl+BREAK.  I'm sorry I cannot remember the
	variable name, but I am sure that someone else on the net will be
	able to.  I will look it up soon and repost if no one else does.


	Scott

	snuzs@trsvax.UUCP

mitch@arcturus.UUCP (Mitchell S. Gorman) (06/10/89)

In article <19188@cup.portal.com>, Jason_Joshua_Irwin@cup.portal.com writes:
> I am trying to write a pascal program using Turbo 4.0 . The program works fine
> but I want the user not to be able to exit with a control break. Is there 
> any way I can cut the control break key off? Any help would be welcomed very
> much.
>                     Thanks in advance,
>                               -Jason


	Include the CRT unit, and make the following assignment:

		checkbreak:=false;

	That oughta do it!


	Mitch @ Rockwell, Anaheim

Disclaimer:	CheckBreak should have been declared in the System unit!!

leonard@bucket.UUCP (Leonard Erickson) (06/10/89)

In article <19188@cup.portal.com> Jason_Joshua_Irwin@cup.portal.com writes:
<I am trying to write a pascal program using Turbo 4.0 . The program works fine
<but I want the user not to be able to exit with a control break. Is there 
<any way I can cut the control break key off? Any help would be welcomed very
<much.

Put this line as early as possible in the program:

CheckBreak := false;

This variable *is* documented in the manual!! 
-- 
Leonard Erickson		...!tektronix!reed!percival!bucket!leonard
CIS: [70465,203]
"I'm all in favor of keeping dangerous weapons out of the hands of fools.
Let's start with typewriters." -- Solomon Short