home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 December
/
simtel1292_SIMTEL_1292_Walnut_Creek.iso
/
msdos
/
clipper
/
nannws34.arc
/
DRIVE.PRG
< prev
next >
Wrap
Text File
|
1989-01-01
|
807b
|
25 lines
* Function: CurDrive()
* Author: Steve Hillbourne
* Version: Clipper Summer '87
* Note(s): Returns the current drive letter using only
* Clipper source code.
*
* Copyright (c) 1988 Nantucket Corp.
FUNCTION CurDrive
PRIVATE drive, position, row, col
SET CURSOR OFF
row = ROW() && Save row.
col = COL() && Save column.
RUN VOL>drive.txt && Get the drive by saving
** the results of DOS's VOL
drive = MEMOREAD("drive.txt") && command to a file and
position = AT("d", drive) + 6 && extracting the drive letter.
drive = SUBSTR(drive, position, 1)
ERASE drive.txt && Cleanup.
SET CURSOR ON
@ row, col SAY "" && Restore cursor position.
RETURN (drive)