Intel® Fortran Libraries Reference
Intel® Fortran Libraries Reference Intel® Fortran Libraries Reference
2 Intel Fortran Libraries ReferenceBecause 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
Descriptions of the Library Routines 2GETDRIVESQQGETENVPortability Function: Reports which drives are available to the system.Module: USE IFPORTSyntaxresult = GETDRIVESQQ ( )Results:The result type is character with length 26. It is the positional character string containing theletters of the drives available in the system.The returned string contains letters for drives that are available, and blanks for drives that are notavailable. For example, on a system with A, C, and D drives, the string 'A CD ' is returned.On Linux* systems, the function returns a string filled with spaces.CompatibilityCONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS DLL LIBSee Also: “GETDRIVEDIRQQ”, “GETDRIVESIZEQQ”, “CHANGEDRIVEQQ”ExampleSee the example for “GETDRIVESIZEQQ”.Portability Subroutine: Returns the value of an environment variable.Module: USE IFPORTSyntaxCALL GETENV (ename, evalue)ename(Input) Character*(*). Environment variable to search for.evalue(Output) Character*(*). Value found for ename. Blank if ename is not found.CompatibilityCONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIBSee Also: “GETENVQQ”Exampleuse IFPORT2-115
- Page 116 and 117: 2 Intel Fortran Libraries Reference
- Page 118 and 119: 2 Intel Fortran Libraries Reference
- Page 120 and 121: 2 Intel Fortran Libraries Reference
- Page 122 and 123: 2 Intel Fortran Libraries Reference
- Page 124 and 125: 2 Intel Fortran Libraries Reference
- Page 126 and 127: 2 Intel Fortran Libraries Reference
- Page 128 and 129: 2 Intel Fortran Libraries Reference
- Page 130 and 131: 2 Intel Fortran Libraries Reference
- Page 132 and 133: 2 Intel Fortran Libraries Reference
- Page 134 and 135: 2 Intel Fortran Libraries Reference
- Page 136 and 137: 2 Intel Fortran Libraries Reference
- Page 138 and 139: 2 Intel Fortran Libraries Reference
- Page 140 and 141: 2 Intel Fortran Libraries Reference
- Page 142 and 143: 2 Intel Fortran Libraries Reference
- Page 144 and 145: 2 Intel Fortran Libraries Reference
- Page 146 and 147: 2 Intel Fortran Libraries Reference
- Page 148 and 149: 2 Intel Fortran Libraries Reference
- Page 150 and 151: 2 Intel Fortran Libraries Reference
- Page 152 and 153: 2 Intel Fortran Libraries Reference
- Page 154 and 155: 2 Intel Fortran Libraries Reference
- Page 156 and 157: 2 Intel Fortran Libraries Reference
- Page 158 and 159: 2 Intel Fortran Libraries Reference
- Page 160 and 161: 2 Intel Fortran Libraries Reference
- Page 162 and 163: 2 Intel Fortran Libraries Reference
- Page 164 and 165: 2 Intel Fortran Libraries Reference
- Page 168 and 169: 2 Intel Fortran Libraries Reference
- Page 170 and 171: 2 Intel Fortran Libraries Reference
- Page 172 and 173: 2 Intel Fortran Libraries Reference
- Page 174 and 175: 2 Intel Fortran Libraries Reference
- Page 176 and 177: 2 Intel Fortran Libraries Reference
- Page 178 and 179: 2 Intel Fortran Libraries Reference
- Page 180 and 181: 2 Intel Fortran Libraries Reference
- Page 182 and 183: 2 Intel Fortran Libraries Reference
- Page 184 and 185: 2 Intel Fortran Libraries Reference
- Page 186 and 187: 2 Intel Fortran Libraries Reference
- Page 188 and 189: 2 Intel Fortran Libraries Reference
- Page 190 and 191: 2 Intel Fortran Libraries Reference
- Page 192 and 193: 2 Intel Fortran Libraries Reference
- Page 194 and 195: 2 Intel Fortran Libraries Reference
- Page 196 and 197: 2 Intel Fortran Libraries Reference
- Page 198 and 199: 2 Intel Fortran Libraries Reference
- Page 200 and 201: 2 Intel Fortran Libraries Reference
- Page 202 and 203: 2 Intel Fortran Libraries Reference
- Page 204 and 205: 2 Intel Fortran Libraries Reference
- Page 206 and 207: 2 Intel Fortran Libraries Reference
- Page 208 and 209: 2 Intel Fortran Libraries Reference
- Page 210 and 211: 2 Intel Fortran Libraries Reference
- Page 212 and 213: 2 Intel Fortran Libraries Reference
- Page 214 and 215: 2 Intel Fortran Libraries Reference
Descriptions of the Library Routines 2GETDRIVESQQGETENVPortability Function: Reports which drives are available to the system.Module: USE IFPORTSyntaxresult = GETDRIVESQQ ( )Results:The result type is character with length 26. It is the positional character string containing theletters of the drives available in the system.The returned string contains letters for drives that are available, and blanks for drives that are notavailable. For example, on a system with A, C, and D drives, the string 'A CD ' is returned.On Linux* systems, the function returns a string filled with spaces.CompatibilityCONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS DLL LIBSee Also: “GETDRIVEDIRQQ”, “GETDRIVESIZEQQ”, “CHANGEDRIVEQQ”ExampleSee the example for “GETDRIVESIZEQQ”.Portability Subroutine: Returns the value of an environment variable.Module: USE IFPORTSyntaxCALL GETENV (ename, evalue)ename(Input) Character*(*). Environment variable to search for.evalue(Output) Character*(*). Value found for ename. Blank if ename is not found.CompatibilityCONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIBSee Also: “GETENVQQ”Exampleuse IFPORT2-115