Setting ERRORLEVELs from

 BBS: Inland Empire Archive
Date: 10-21-92 (21:38)             Number: 359
From: PAUL MCGOLDRICK              Refer#: NONE
  To: TOM CARROLL                   Recvd: NO  
Subj: Setting ERRORLEVELs from       Conf: (2) Quik_Bas
TC>DEFINT A-Z
TC>DECLARE SUB ExitWithErrLvl ALIAS "_exit" (BYVAL ErrorLevel%)
TC>Vare% = 3
TC>PRINT "Exiting with errorlevel 3"
TC>ExitWithErrLvl Vare%
TC>END
TC>
TC>Make sure you set the errorlevel value in Vare% (or whatever you want to
TC>call it).  Also be sure to save your work before executing this code

TC>from within the environment because it WILL exit completely. <g>

        You can't leave any of QB's ON statements (ON ERROR, ON COM,
etc.) active because they hook interrupts. Exit without cleaning them
up and you'll hang your system fer shure. Also, you can skip the END
statement (as above) because the bottom drops out on the aliased call
and you never reach END to execute <g>.
___
 X EZ 1.30 X The greatest sin is to be conscious of none.

--- Maximus 2.01wb
 * Origin: Central Computer Banks - mcws.fidonet.org (1:102/851)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET