Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Tom Rettigs Library - lastdrive() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 LASTDRIVE()
 Evaluates the setting of LASTDRIVE in Config.sys.
 Returns <expC> drive letter specified on the LASTDRIVE= line in Config.sys.

 Returns "0"  if LASTDRIVE is not specified in Config.sys
         "-1" if Config.sys cannot be found.
 These are returned instead of our standard error message for
 consistency with other functions that read Config.sys and return <expN>.

 Uses COMSPEC to determine where to find Config.sys.

 m_lastdr = LASTDRIVE()
 DO CASE
    CASE m_lastdr = -1
       ? "Error -- cannot find Config.sys"
    CASE m_lastdr < "M"
       ? "Error -- set LASTDRIVE to 'M' in Config.sys"
    OTHERWISE
       ? "Congratulations -- Config.sys is OK!"
 ENDCASE

 Hazard
    If you boot from a floppy disk, then change disks, or SET
    COMSPEC to a different disk drive, this will not return the
    correct result unless the new disk or drive also contains a
    Config.sys file with the same information as the one with
    which you booted.


             Placed in the Public Domain by Tom Rettig Assoc.

See Also: BUFFERS() COUNTRY() FILES()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson