DSK() Function - Get Disk Configuration




The DSK() function determines the current default disk drive as well as which drives are configured.




A valid disk. Using DSK("") returns the current default drive as a string, such as "A:" or "B:".

To determine if a disk is configured, provide a disk name, such as DSK("A:") or DSK("B:"). Using an integer argument produces the same results as using a disk name (DSK(0)=DSK("A:"), DSK(1)=DSK("B:"), and so on). If the argument given is a string with a zero length, the string returned will be the current disk name.


Branch to be taken if an error occurs during execution.

If the disk is not valid, an !ERROR=17 is produced.

Some host systems do not use disk names; however, it is possible that the installer of PRO/5 chose to emulate the disks within PRO/5. For additional information, see PRO/5 Disk Configuration in the Installation and Configuration Guide.


1000 PRINT "Current disk drive: "+DSK("")

See Also

Functions - Alphabetical Listing