_Drive Function

Purpose

Specifies the current drive as an integer.

Syntax

% = _Drive

%: integer expression

Description

_Drive specifies the current drive as a numeric, e.g. 67 for drive "C". This is the opposite of ChDrive d%. Chr$(_Drive) returns the drive as a letter. The following program will determine all available drives:

Example

Local i%

For i% = Asc("C") To Asc("Z")

ChDrive Chr(i%)

If i% = _Drive

Print "Drive "; Chr$(_Drive)

EndIf

Next i%

See Also

ChDrive

{Created by Sjouke Hamstra; Last updated: 30/09/2014 by James Gaite}