Manual Reference Pages  - merge (3m_overload)

NAME

merge(3f) - [M_overload:INTRINSIC] allow MERGE(3f) intrinsic to take strings of different length (LICENSE:PD)

CONTENTS

Synopsis
Description
Examples
Author
License

SYNOPSIS

result = merge(tsource, fsource, mask)

DESCRIPTION

A convenience for allowing strings of different length in the MERGE(3f) intrinsic.

All other behavior should be the same as the MERGE(3f) intrinsic.

EXAMPLES

Sample usage:

   program demo_merge
   ! allow strings of different length on merge
   use M_overload, only : merge
   implicit none
   character(len=*), parameter :: gen=’(*("[",g0,"]":,","))’

write(*,gen)merge(’a’,’bbbbb’,1.eq.1) write(*,gen)merge(’a’,’bbbbb’,1.eq.2) write(*,gen)merge([’a’,’b’],[’bbbbb’,’ccccc’],1.eq.2)

end program demo_merge

Results:

       > [a    ]
       > [bbbbb]
       > [bbbbb],[ccccc]

AUTHOR

John S. Urban

LICENSE

Public Domain


Nemo Release 3.1 merge (3m_overload) July 24, 2024
Generated by manServer 1.08 from 72e8056b-bcf8-4853-824f-b72eafd5102d using man macros.