-
-
Save drhirsch/0af6832a9e0c61ecd81d to your computer and use it in GitHub Desktop.
Split a string into 2 either side a delimiter in FORTRAN
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! split a string into 2 either side of a delimiter token | |
function split(instr, delm) | |
implicit none | |
CHARACTER(len=80),intent(in) :: instr,delm | |
INTEGER :: idx | |
idx = scan(instr,delm) | |
split = instr(1:idx-1) | |
END function split |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment