GETDRIVE statement

Purpose: This statement will return the current drive number. The drive numbers are zero based. 0 corresponds to drive A:


 Syntax:

 DriveNumber% = GETDRIVE()

 Parameters:

  • DriveNumber% Returned integer containing the current drive number. The drive numbers are zero based. 0 corresponds to drive A:

Example:


 DriveStr$ = CHR$(GETDRIVE() + 64)

Result:

DriveStr$ will contain the letter of the current drive.