QB64 to set a DOS errorlevel codeby (Login MarineDon)R How can QB64 set a DOS errorlevel code upon exiting?
================================================ I am trying to convert a QB45 program, Seamenu.Bas, to QB64, but cannot get it to compile. Seamenu.Bas runs under a batch file which calls upon Seamenu.Bas to place a menu on screen and waits until user presses a key. Seamenu.Bas then exits and emits a DOS errorcode. If you click below to link to SEAMENU.BAS, a sample batch file, MainMenu.Bat, is located at the end of the main program of SEAMENU.BAS with (') apostrophes placed before each line. At one time, to exit a program with an DOS errorlevel number, I used Ethan Winer's PRO.LIB's CALL SetLevel(ExitCode%). Then, I learned how to do this in pure QB4.5 code, like this: ================================================== DECLARE SUB Bye CDECL ALIAS "_exit" (BYVAL Selection%) ' ' what.choice: IF Selection% > 0 THEN CALL Bye(Selection%) END IF SYSTEM =================================================== When I attempt to compile my SEAMENU.BAS program with QB64 I get following error: .. Expected CALL sub-name [(...)] Caused by (or after)" CALL BYE ( SELECTION% ) LINE 203:CALL Bye(Selection%) =================================================== I looked at QB64's _CLIPBOARD$ (function), _CLIPBOARD$ (statement) and _DONTWAIT (SHELL action), but they didn't work for me. =================================================== Link to SEAMENU.BAS here: http://www.smithselfgen.com/QuickBasic/SEAMENU.BAS Link to SEAMENU.ZIP here: http://www.smithselfgen.com/QuickBasic/SEAMENU1.ZIP Regards to all, Don Smith SCREEN SHOT:
|
| Response Title | Author and Date |
| QB64 does not support Interrupt &H21 | on Sep 14 |
| Because | on Sep 14 |
| That's why I asked... | on Sep 14 |
| I thought... | on Sep 15 |
| You will like creating pop up boxes in QB64. | on Sep 17 |
| *Out of sight, Clipster!!! | on Sep 17 |
| Example: | on Sep 18 |
| QB64 also supports SCREEN 0... | on Sep 20 |