home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
S12334.ZIP
/
SETDRIVE.BAS
< prev
next >
Wrap
BASIC Source File
|
1989-03-23
|
371b
|
15 lines
'***** SetDrive.Bas - BASIC subprogram that sets the current drive
'syntax: CALL SetDrive(Drive$)
' where: Drive$ is specified as "A", "B", and so forth
DEFINT A-Z
DECLARE FUNCTION DosSelectDisk%(BYVAL Drive)
SUB SetDrive(Drive$)
Drive = ASC(UCASE$(Drive$)) - ASC("A") + 1 'now "A" = 1, "B" = 2, etc.
ErrorCode = DosSelectDisk%(Drive)
END SUB