Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!mit-eddie!uw-beaver!ubc-cs!alberta!herald.usask.ca!weyr!f43.n140.z1.FIDONET.ORG!lowey From: lowey@f43.n140.z1.FIDONET.ORG (Kevin Lowey) Newsgroups: comp.lang.modula2 Subject: Re: TopSpeed and returning an Exit() code? Message-ID: <812.26E7391E@weyr.FIDONET.ORG> Date: 5 Sep 90 23:24:27 GMT Sender: ufgate@weyr.FIDONET.ORG (newsout1.26) Organization: FidoNet node 1:140/43 - U of S Computing Se, Saskatoon Sask Lines: 51 > I am working for Oakland University as a student programmer for Academic > Computing Services. My first project is to write a menu program for our > PC's so the user doesn't have to learn DOS. Due to constraints, I cannot > have my program write to any disk, so I need to somehow put my menu > program in the middle of a .bat file. I work for the Department of Computing Services at the University of Saskatchewan. I wrote a similar program in Turbo Pascal (sorry). I originally wrote it for the same reasons you did, to provide a menu program for your PC's so the user doesn't have to learn DOS immediately. Take my advice. Instead of doing this, invest the training time to TEACH people how to use DOS correctly. I installed my silly menu program on machines all over campus. People then bought WordPerfect, and didn't even know what a Directory was, so they had to call ME to install WordPerfect. Then they did an update to WordPerfect. Guess who they called again? Eventually I took the program off the machines. Now they have learned DOS and can do the things themselves without having to call me all the time. The idea of providing a menu driven front end to DOS so that people can use the computer immediately seemed to have merit. The idea was that they would then be able to learn MS-DOS when they have time. The problem is, they never have time until you force them to need to make the time. We still use the menu program in our micrcomputer laboratory to launch applications, etc. I did it by having the menu program EXEC a subprocess that would run the program. When the subprocess finished, it would return to the Menu program and continue from there. This ate up about 4K of memory. I recently updated this using the HALT command in Turbo Pascal to return an errorlevel. That way the menus could be displayed, the error level is returned, then the batch file tests the error level to see which program to run. Check your Modula-2 manual for a HALT or EXIT command that lets you return the errorlevel. If you want to get my program, you can download it from the University of Saskatchewan Fidonet BBS at (306) 966-4857 (2400 baud). The file is called SYSMENU4.ZIP (a PKZIP archive). There are much fancier menu programs available which are also on the BBS. - Kevin Lowey -- Kevin Lowey - via Benden Weyr - FidoNet Node 1:140/22 use UUCP: ...!alberta!herald!lowey Internet: lowey@sask.usask.ca Standard Disclaimers Apply...