separator(3f) - [M_io:QUERY] try to determine pathname directory separator character (LICENSE:PD)
Synopsis
Description
Examples
function separator() result(sep)
character(len=1) :: sep
Try to determine the separator character used to separate directory names from file basenames. It is assumed it is either a backslash or a slash character.
Then, using the name the program was invoked with, then an INQUIRE(3f) of that name, then ".\NAME" and "./NAME" try to find an expected separator character.
First, the environment variables PATH, HOME, PWD, and SHELL are examined for a backslash, then a slash. Can be very system dependent. If the queries fail the default returned is "/".
The value is cached as a return value for subsequent calls.
sample usage
program demo_separator use M_io, only : separator implicit none write(*,*)separator=,separator() end program demo_separator
Nemo Release 3.1 | separator (3) | February 23, 2025 |