Board index » delphi » Quitting program in middle of program
Reg Edwards
![]() Delphi Developer |
Wed, 15 Dec 2004 21:51:01 GMT
|
Reg Edwards
![]() Delphi Developer |
Wed, 15 Dec 2004 21:51:01 GMT
Quitting program in middle of program
I have Turbo Pascal 6.
I wish to be able to quit a program in the middle of a procedure which Var Number: Real; Could someone please suggest the addition code needed to Quit the program |
Clif Pen
![]() Delphi Developer |
Thu, 16 Dec 2004 00:18:01 GMT
Re:Quitting program in middle of programOn Sat, 29 Jun 2002 13:51:01 +0000 (UTC), "Reg Edwards" Quote<g4fgq.r...@btinternet.com> wrote: Program ExitOnQ; VAR Procedure EnterData(flg:Boolean); BEGIN Var Number: Real; |
Reg Edward
![]() Delphi Developer |
Thu, 16 Dec 2004 18:07:27 GMT
Re:Quitting program in middle of programCliff, thanks very much for your time and expertise. I've been trying on and off for ages to get something to work. With minor modifications it fits very nicely in my main programs. ---- Reg ======================== Regards from Reg G4FGQ Free Radio Modelling Software Go to http://www.g4fgq.com ======================== |
Femme Verbee
![]() Delphi Developer |
Fri, 17 Dec 2004 07:53:40 GMT
Re:Quitting program in middle of programPersonally I would never use the > {$I-} Read(Number) {$I+} The way I solved this is here's some code. It's ripped from a larger package. But it gives an --Femme uses crt,mouse; Procedure piep; function decimals(x:extended;signif:integer):integer; function i2s(i:longint):string; {integer to string conversion} function R2S(r:extended;displdeci:integer):string; {real to string} const overwritemode:boolean=false; function editstring(s:string):string; repeat until (keypressed or mouse_clicked($FF)); {wait for mouse or if keypressed then ch:=readkey else case ch of function editinteger(i:longint):longint; function editreal(r:extended;displdeci:integer):extended; const i:integer=123; write('R='); end. |
j..
![]() Delphi Developer |
Sat, 18 Dec 2004 00:00:06 GMT
Re:Quitting program in middle of programIn <afke05$6k...@venus.btinternet.com>, "Reg Edwards" <g4fgq.r...@btinternet.com> writes: Quote>I have Turbo Pascal 6. because it leaves you with no way to check if that letter was in fact a 'Q'. A better way is to retrieve a string from the user, test/process for 'Q' then convert that string into floating point using the 'val' function after t{*word*220} leading/trailing blanks. To quit in middle of program, although, like 'goto', its use is not good 'style', |
Osmo Ronkan
![]() Delphi Developer |
Wed, 22 Dec 2004 19:48:04 GMT
Re:Quitting program in middle of programQuoteClif Penn <clifp...@airmail.net> wrote in message <news:9896DA9337D05D5E.C2673B604CEB806C.9DE1D2B581947D14@lp.airnews.net>... flg:= (entry<>'') and (Upcase(Entry[1]='Q'); Quote> If not flg then VAL(Entry, Number, err); |
Bas van Besou
![]() Delphi Developer |
Thu, 23 Dec 2004 00:56:05 GMT
Re:Quitting program in middle of programQuoteOn Sat, 06 Jul 2002 07:48:04 -0400, Osmo Ronkanen wrote: if you enter an empty string the flg wouldn't be set flg := (entry<>'') OR (Upcase(entry[1]='Q'); Quote
|