Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!mips!pacbell.com!ucsd!nosc!crash!nkraft From: nkraft@crash.cts.com (Norman Kraft) Newsgroups: comp.lang.pascal Subject: Re: Bug In Turbo Pascal v6.0 - crt unit/checkbreak Message-ID: <1991May10.001152.11301@crash.cts.com> Date: 10 May 91 00:11:52 GMT References: <1991May9.032547.13756@cs.odu.edu> <1991May9.042604.4024@nntp-server.caltech.edu> Organization: Crash TimeSharing, El Cajon, CA Lines: 46 >In article <1991May9.032547.13756@cs.odu.edu> popkin@ceawlin.cs.odu.edu (Brian N. Popkin) writes: >I noticed that the checkbreak function only works part of the time. > >program poker(input,output); > >uses crt; > >var > CheckBreak : Boolean; > >begin > { ... } > CheckBreak := FALSE; >end. > >in the previous program, when I hit control-break, it still breaks and >doesn't disable the break key.. > >any suggestions? Well, if you coded it a above, it's not likely to work. CheckBreak is a variable declared within CRT. By redeclaring it above, you override the CRT reference, and make "CheckBreak := FALSE" a statement which cannot have the desired effect. Either remove the CheckBreak variable declaration, or (if for some reason you need a variable by that name) change the above line of code to CRT.CheckBreak := False; Norm. -------------------------------------------------------------------------- Norman Kraft INET : nkraft@bkhouse.cts.com Director, Software Development UUCP : ucsd!bkhouse!nkraft Postal Buddy Corporation GEnie: N.KRAFT3 San Diego, CA FIDO : 1:102/943 FAX : (619) 272-3175 "Things should be as simple as possible, but not simpler." - A. Einstein -------------------------------------------------------------------------- -- -------------------------------------------------------------------------- Norman Kraft INET : nkraft@crash.cts.com Director, Software Development UUCP : ucsd!crash!nkraft Postal Buddy Corporation GEnie: N.KRAFT3