aboutsummaryrefslogtreecommitdiff
path: root/Getcount.f
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2021-08-03 14:41:53 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2021-08-03 14:41:53 -0400
commitaf8fa097905186e0d8ba257e4d70d63fe8901264 (patch)
tree647de7ddd01c750e9a80849b3cf79efddf32d4b2 /Getcount.f
downloadmoog-af8fa097905186e0d8ba257e4d70d63fe8901264.tar.gz
Initial commit
Diffstat (limited to 'Getcount.f')
-rwxr-xr-xGetcount.f24
1 files changed, 24 insertions, 0 deletions
diff --git a/Getcount.f b/Getcount.f
new file mode 100755
index 0000000..8369a03
--- /dev/null
+++ b/Getcount.f
@@ -0,0 +1,24 @@
+
+ subroutine getcount (num,linechars)
+c***************************************************************************
+c this routine simply counts the number of characters in the
+c ascii array 'linechars' until the first blank is seen;
+c it is most useful for discovering the length of a file name.
+c***************************************************************************
+
+ character*80 linechars
+ integer num
+
+
+ do i=num,1,-1
+ if (linechars(i:i) .ne. ' ') go to 11
+ enddo
+ num = -1
+ return
+11 num = i
+
+
+ return
+ end
+
+