Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

frspaces.f

Go to the documentation of this file.
00001 
00002 c     
00003 c     Copyright (c) 1986,1987,1988,1989,1990,1991,1992,1993,
00004 c     by Steve McMillan, Drexel University, Philadelphia, PA.
00005 c     
00006 c     All rights reserved.
00007 c     
00008 c     Redistribution and use in source and binary forms are permitted
00009 c     provided that the above copyright notice and this paragraph are
00010 c     duplicated in all such forms and that any documentation,
00011 c     advertising materials, and other materials related to such
00012 c     distribution and use acknowledge that the software was developed
00013 c     by the author named above.
00014 c     
00015 c     THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
00016 c     IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
00017 c     WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00018 c     
00019 
00020 
00021       subroutine fr spaces(ztit,nztit)
00022       save
00023 c     
00024 c     Calculate the true length, nztit, of a character string, ztit.
00025 c     The length of the string is the position of the character before
00026 c     a block of five blanks or a non-printing character is encountered.
00027 c     If the input string is blank, nztit=1 is returned.
00028 c     
00029       character*(*) ztit
00030       character*5 space
00031       space='     '
00032 c
00033       nztit=index(ztit,space)-1
00034       if (nztit.lt.0) then
00035           nztit=len(ztit)
00036       else if (nztit.eq.0) then
00037           nztit=1
00038       end if
00039 c
00040       do i=1,nztit
00041           ich=ichar(ztit(i:i))
00042           if (ich.lt.32.or.ich.gt.126) go to 20
00043       end do
00044       return
00045 20    nztit=max(1,min(i-1,nztit))
00046 c
00047       end

Generated at Sun Feb 24 09:57:01 2002 for STARLAB by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001