fdoc

functionhas_drivepureprivate

pure logical function has_drive(path)

True if path starts with a drive letter, as in C:.

Arguments

NameTypeIntentAttributesDescription
pathcharacter(len=*)in

the path

Result

NameTypeAttributesDescription
has_drivelogical

Source

Show the code
pure logical function has_drive(path)
    character(len=*), intent(in) :: path    !! the path

    has_drive = .false.
    if (len(path) < 2) return
    has_drive = path(2:2) == ':' .and. verify(path(1:1), 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') == 0
end function has_drive

Graphs

Called by