12.07.2015 Views

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2 Intel <strong>Fortran</strong> <strong>Libraries</strong> <strong>Reference</strong>Because drives are identified by a single alphabetic character, GETDRIVESIZEQQ examinesonly the first letter of drive. The drive letter can be uppercase or lowercase. You can use theconstant FILE$CURDRIVE (defined in IFPORT.F90) to get the size of the current drive.If GETDRIVESIZEQQ fails, use GETLASTERRORQQ to determine the reason.CompatibilityCONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIBSee Also: “GETLASTERRORQQ”, “GETDRIVESQQ”, “GETDRIVEDIRQQ”,“CHANGEDRIVEQQ”,“CHANGEDIRQQ”Example! Program to demonstrate GETDRIVESQQ and GETDRIVESIZEQQUSE IFPORTCHARACTER(26) drivesCHARACTER(1) adriveLOGICAL(4) statusINTEGER(4) total, availINTEGER(2) i! Get the list of drivesdrives = GETDRIVESQQ()WRITE (*,'(A, A)') ' Drives available: ', drives!!Cycle through them for free space and write to consoleDO i = 1, 26adrive = drives(i:i)status = .FALSE.WRITE (*,'(A, A, A, \)') ' Drive ', CHAR(i + 64), ':'IF (adrive .NE. ' ') THENstatus = GETDRIVESIZEQQ(adrive, total, avail)END IFIF (status) THENWRITE (*,*) avail, ' of ', total, ' bytes free.'ELSEWRITE (*,*) 'Not available'END IFEND DOEND2-114

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!