Intel® Fortran Libraries Reference
Intel® Fortran Libraries Reference Intel® Fortran Libraries Reference
2 Intel Fortran Libraries ReferenceExampleUSE IFPORTinteger(4) statarray(12), istatOPEN (unit=1,file='datfile.dat')ISTAT = FSTAT (1, statarray)if (.NOT. istat) thenprint *, statarrayend ifFTELL, FTELLI8Portability Functions: Return the current position of a file.Module: USE IFPORTSyntaxresult = FTELL (lunit)result = FTELLI8 (lunit)lunit(Input) INTEGER(4). External unit number of a file.Results:The result type is INTEGER(4) for FTELL; INTEGER(8) for FTELLI8. The result is the offset,in bytes, from the beginning of the file. A negative value indicates an error, which is the negationof the IERRNO error code. The following is an example of an error code:EINVAL: lunit is not a valid unit number, or is not open.CompatibilityCONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS LIBFULLPATHQQPortability Function: Returns the full path for a specified file or directory.Module: USE IFPORTSyntaxresult = FULLPATHQQ (name, pathbuf)2-94
Descriptions of the Library Routines 2name(Input) Character*(*). Item for which you want the full path. Can be the name of a file in thecurrent directory, a relative directory or file name, or a network uniform naming convention(UNC) path.pathbuf(Output) Character*(*). Buffer to receive full path of the item specified in name.Results:The result type is INTEGER(4). The result is the length of the full path in bytes, or 0 if thefunction fails (usually for an invalid name).The length of the full path depends upon how deeply the directories are nested on the drive you areusing. If the full path is longer than the character buffer provided to return it (pathbuf),FULLPATHQQ returns only that portion of the path that fits into the buffer.Check the length of the path before using the string returned in pathbuf. If the longest full path youare likely to encounter does not fit into the buffer you are using, allocate a larger character buffer.You can allocate the largest possible path buffer with the following statements:USE IFPORTCHARACTER($MAXPATH) pathbuf$MAXPATH is a symbolic constant defined in IFQWIN.F90 as 260.CompatibilityCONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS LIBSee Also: “SPLITPATHQQ”ExampleUSE IFPORTUSE IFCORECHARACTER($MAXPATH) bufCHARACTER(3) driveCHARACTER(256) dirCHARACTER(256) nameCHARACTER(256) extCHARACTER(256) fileINTEGER(4)lenDO WHILE (.TRUE.)WRITE (*,*)2-95
- Page 96: 2 Intel Fortran Libraries Reference
- Page 100 and 101: 2 Intel Fortran Libraries Reference
- Page 102 and 103: 2 Intel Fortran Libraries Reference
- Page 104 and 105: 2 Intel Fortran Libraries Reference
- Page 106 and 107: 2 Intel Fortran Libraries Reference
- Page 108 and 109: 2 Intel Fortran Libraries Reference
- Page 110 and 111: 2 Intel Fortran Libraries Reference
- Page 112 and 113: 2 Intel Fortran Libraries Reference
- Page 114 and 115: 2 Intel Fortran Libraries Reference
- 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 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 166 and 167: 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
Descriptions of the Library Routines 2name(Input) Character*(*). Item for which you want the full path. Can be the name of a file in thecurrent directory, a relative directory or file name, or a network uniform naming convention(UNC) path.pathbuf(Output) Character*(*). Buffer to receive full path of the item specified in name.Results:The result type is INTEGER(4). The result is the length of the full path in bytes, or 0 if thefunction fails (usually for an invalid name).The length of the full path depends upon how deeply the directories are nested on the drive you areusing. If the full path is longer than the character buffer provided to return it (pathbuf),FULLPATHQQ returns only that portion of the path that fits into the buffer.Check the length of the path before using the string returned in pathbuf. If the longest full path youare likely to encounter does not fit into the buffer you are using, allocate a larger character buffer.You can allocate the largest possible path buffer with the following statements:USE IFPORTCHARACTER($MAXPATH) pathbuf$MAXPATH is a symbolic constant defined in IFQWIN.F90 as 260.CompatibilityCONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS LIBSee Also: “SPLITPATHQQ”ExampleUSE IFPORTUSE IFCORECHARACTER($MAXPATH) bufCHARACTER(3) driveCHARACTER(256) dirCHARACTER(256) nameCHARACTER(256) extCHARACTER(256) fileINTEGER(4)lenDO WHILE (.TRUE.)WRITE (*,*)2-95