home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
GLEN
/
VOL10N22.ZIP
/
CDISK.PRG
< prev
next >
Wrap
Text File
|
1991-07-19
|
1KB
|
27 lines
***********************************************************************
* CDISK.PRG Contains CURDISK() UDF for Clipper S87
* Demonstrates use of CURDISK() Clipper UDF.
***********************************************************************
?
? "Current Disk Drive -> " + CURDISK()
?
RETURN
***********************************************************************
* CURDISK() - Get current disk drive letter. UDF for Clipper S87
***********************************************************************
FUNCTION CURDISK
PRIVATE xRetVal, xHandle1, xRow, xCol
xRow = ROW() && save cursor position, row
xCol = COL() && and column
RUN CD > TMP. && run "CD" redirected to a file
xHandle1 = FOPEN("TMP.",0) && open file
xRetVal = FREADSTR(xHandle1, 2) && read first 2 chars
xRetVal = IIF(":" $ xRetVal, xRetVal, "") && check for error
FCLOSE(xHandle1) && close file
ERASE TMP. && erase file
@ xRow, xCol SAY "" && restore cursor position
RETURN xRetVal