Class | file_tools_class |
In: |
LatticeClass/file_tools_class.F90
|
$Id: file_tools_class.F90,v 1.4 2011/02/02 12:17:07 ishikawa Exp $
Function : | |
unit : | integer |
return free file unit number
function search_free_file_unit_ft() result(unit) ! ! return free file unit number ! implicit none integer :: unit logical :: is_opened current_unit = START_UNIT do INQUIRE(UNIT=current_unit,OPENED=is_opened) if (is_opened) then current_unit = current_unit+1 else exit endif if (current_unit > MAX_UNIT) then call error_stop("Fail to search free IO unit") endif enddo unit = current_unit return end function