C Library Functions  - separator (3)

NAME

separator(3f) - [M_io:QUERY] try to determine pathname directory separator character (LICENSE:PD)

CONTENTS

Synopsis
Description
Examples

SYNOPSIS

function separator() result(sep)

    character(len=1) :: sep

DESCRIPTION

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.
First, the environment variables PATH, HOME, PWD, and
  SHELL are examined for a backslash, then a slash.
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.

Can be very system dependent. If the queries fail the default returned is "/".

The value is cached as a return value for subsequent calls.

EXAMPLES

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) June 29, 2025
Generated by manServer 1.08 from 8fef984f-23c2-4f46-ae52-1111f53c2cf1 using man macros.