parker@vela.acs.oakland.edu (Jeff Parker) (09/05/90)
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. Can I - 1) Set an environment variable for the next part of the .bat file or 2) Return an error level that can be tested? From the manual, I can see no way of doing either of these. I would much prefer doing this in Modula-2 because of the windowing procedures available with this version. I also happen to enjoy programming in M2. Anyway, thanks for any help. -- Jeffrey D. Parker (no philosopher) | By all means marry; if you get a good wife, INET: parker@vela.acs.oakland.edu | you'll become happy; if you get a bad one, BITNET: PARKER@OAKLAND | you'll become a philosopher. Socrates UUCP: ...!umich!vela!amiga1!fanatic| (Or get an AMIGA - You'll be Happy!)
lowey@f43.n140.z1.FIDONET.ORG (Kevin Lowey) (09/06/90)
> 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...
Peter.M..Perchansky@f101.n273.z1.fidonet.org (Peter M. Perchansky) (09/10/90)
Hello: You can set a DOS error level in JPI Modula-2 by using Lib.SetReturnCode. -- uucp: uunet!m2xenix!puddle!273!101!Peter.M..Perchansky Internet: Peter.M..Perchansky@f101.n273.z1.fidonet.org
Ralf.Hauber@p16.f1.n313.z2.fidonet.org (Ralf Hauber) (09/12/90)
Hi Jeff! In a message of <Sep 06 07:16>, Jeff Parker (1:105/42) writes: > 2) Return an error level that can be tested? >From the manual, I can see no way of doing either of these. I would much >prefer doing this in Modula-2 because of the windowing procedures The module "Lib" provides the procedure "SetReturnCode(code: SHORTCARD)", which lets You specify the DOS return code. You can access this code through the DOS code ErrorLovel. Regards Ralf. -- uucp: uunet!m2xenix!puddle!2!313!1.16!Ralf.Hauber Internet: Ralf.Hauber@p16.f1.n313.z2.fidonet.org