home *** CD-ROM | disk | FTP | other *** search
- {@@@@@@@@@@@ copyright (C) 1984 by Neil J. Rubenking @@@@@@@@@@@@@@@@@@@@@@@@
- The purchaser of these procedures and functions may include them in COMPILED
- programs freely, but may not sell or give away the source text.
-
- }
- {$I regpack.typ}
- {$I getfree.lib}
- {$I getsetdd.lib}
- var
- OK : boolean;
- drv : char;
- HowMuch : real;
- begin
- repeat
- Write('Enter drive to check -- just <enter> for current :');
- read(drv);
- WriteLn;
- until UpCase(drv) in [#26,'A'..'D']; { for some reason, if you just <enter>
- in response to a READ of a CHAR,
- character #26 is received }
- if drv = #26 then drv := '@' { GetFree uses "@" to represent the current
- drive because it comes just before "A" in
- the ASCII order. }
- else drv := UpCase(drv);
- GetFree(drv,HowMuch,OK);
- if OK then
- begin
- if drv = '@' then GetSetDrive('G',drv);
- Write(HowMuch:1:0,' bytes free on drive ',drv);
- end
- else WriteLn('Invalid drive');
- end.