Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!uwm.edu!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!uxh.cso.uiuc.edu!mead From: mead@uxh.cso.uiuc.edu Newsgroups: comp.lang.pascal Subject: TP55: How to force DOS exit code? Message-ID: <13000005@uxh.cso.uiuc.edu> Date: 9 May 90 03:46:00 GMT Lines: 20 Nf-ID: #N:uxh.cso.uiuc.edu:13000005:000:765 Nf-From: uxh.cso.uiuc.edu!mead May 8 22:46:00 1990 I would like to author some batch extentions (never mind that some packages of these exist already) in Turbo Pasdcal (V55). One thing I'd like to be able to do is prompt the user for a Y/N response to some arbitrary question and to communicate this to the batch file. I believe the way one does this is to force a MS-DOS exit code of (say) 1 for yes and (say) 2 for no - then use a line like: if errorlevel=1 goto yesresp so my question is: How do you force a particular exit code? Alternative schemes also welcome, email is prefered. Thanks in advance. Also, should I succeed, would the package be of interest to (and appropriate for) this group (I'd post the TP sources)? 'Course, I could always email them to interested parties as well. -alan mead