DSK
Current/Configured Disk Drives
This string function is available only in Microsoft Windows and returns the name of the current default disk or helps determine which system disks are configured.
Syntax
Section titled “Syntax”DSK (disk-specifier [,ERR=line-ref|,ERC=error-code])disk-specifier- is a positive integer-value, null, or string-value containing the name of a logical disk directory.
line-ref- is the program line number or label to branch to if an error is produced by this function.
error-code- is a programmer-defined error code. Valid values are positive or negative whole numbers.
Remarks
Section titled “Remarks”This string function is available only in Thoroughbred Basic for Microsoft Windows.
Valid values for disk-specifier and their meanings are:
null string =- returns the name of the current default logical disk directory.
integer-value- = returns the name for the logical disk directory specified by integer-value if that logical disk directory is mounted.
string-value- = returns the name specified by string-value if that logical disk directory is mounted.
If an attempt is made to access a logical disk directory that is not configured, either through numeric-value or string-value specification, an ERR=17 results.
Examples
Section titled “Examples”PRINT DSK(0)prints the name of the disk mounted as logical disk drive zero (e.g. “A:”).
PRINT DSK("")prints the current default logical disk directory; if running off the first hard disk this might print “C:”.
See also
Section titled “See also”SETDRIVE directive
From the Thoroughbred Basic Language Reference, Volume I: A–E, version 8.9.1. Open this page in the PDF