From: dberge@mx2.redestb.es.DBERGE (Diego Berge)
Newsgroups: comp.sys.hp48
Subject: confirmYN -- Simple Confirmation Function.
Date: 20 Jun 1998 02:32:44 GMT
Organization: Telefonica Transmision de Datos
Lines: 39
Message-ID: <6mf70c$nlg$1@diana.bcn.ibernet.es>
NNTP-Posting-Host: ppp165.199.redestb.es
Mime-Version: 1.0
Content-Type: Text/Plain; charset=US-ASCII
X-Newsreader: WinVN 0.99.9 (Released Version) (16bit)
Xref: republic.btigate.com comp.sys.hp48:12258

Hi again,

   here's another routine that I thought some of you could use on your 
programs. I sometimes need the user to confirm an action (like deleting 
something) and then I feel like I lack a simple Yes/No interface -- so here it 
is.

Arguments:
1: "string"   @ this is the prompt string, may have line breaks.

Results:                                 Results:
(if the user hits 'yes')                 (if the user hits 'no', or CANCEL)
1: 1                                     1: 0

If the user hits any key other than 'yes', 'no' or CANCEL, it'll simply beep. 
Basically the good thing is that it catches CANCEL so the user can't interrupt 
execution without the program being able to handle it.


Checksum: # 51699d
          # C9F3h
Bytes:    352

Regards,
Diego Berge.
