File: slstr.f

package info (click to toggle)
iraf 2.17-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 95,288 kB
  • sloc: ansic: 228,894; fortran: 75,606; lisp: 18,369; xml: 8,401; sh: 6,111; yacc: 5,648; lex: 596; makefile: 575; asm: 153; csh: 95; sed: 4
file content (32 lines) | stat: -rw-r--r-- 740 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
      integer function slstr (from, to, first, chars)
      integer from (100), to (100)
      integer first, chars
      integer len, i, j, k
      integer length
      len = length (from)
      i = first
      if (.not.(i .lt. 1))goto 23000
      i = i + len + 1
23000 continue
      if (.not.(chars .lt. 0))goto 23002
      i = i + chars + 1
      chars = - chars
23002 continue
      j = i + chars - 1
      if (.not.(i .lt. 1))goto 23004
      i = 1
23004 continue
      if (.not.(j .gt. len))goto 23006
      j = len
23006 continue
      k = 0
23008 if (.not.(i .le. j))goto 23010
      to (k + 1) = from (i)
      i = i + 1
23009 k = k + 1
      goto 23008
23010 continue
      to (k + 1) = -2
      slstr=(k)
      return
      end