Debian Codegraph @

packages/seacas/libraries/suplib/ffonof.f

raw
1 C Copyright(C) 1999-2020 National Technology & Engineering Solutions
2 C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
3 C NTESS, the U.S. Government retains certain rights in this software.
4 C
5 C See packages/seacas/LICENSE for details
6
7 C=======================================================================
8 SUBROUTINE FFONOF (IFLD, INTYP, CFIELD, ISON, *)
9 C=======================================================================
10
11 C --*** FFONOF *** (FFLIB) Parse free-field ON/OFF
12 C -- Written by Amy Gilkey - revised 02/24/86
13 C --
14 C --FFONOF parses an on/off option from an input field. No field is
15 C --assumed 'ON'.
16 C --
17 C --Parameters:
18 C -- IFLD - IN/OUT - the index of the current field number, incremented
19 C -- INTYP - IN - the input type from the free-field reader
20 C -- CFIELD - IN - the input option string
21 C -- ISON - OUT - true iff the option is ON, set only if no error
22 C -- * - return statement if the field is invalid; message is printed
23
24 INTEGER IFLD
25 INTEGER INTYP(*)
26 CHARACTER*(*) CFIELD(*)
27 LOGICAL ISON
28
29 CHARACTER*4 OPT
30
31 IF (INTYP(IFLD) .EQ. 0) THEN
32 OPT = CFIELD(IFLD)
33 ELSE IF (INTYP(IFLD) .LE. -1) THEN
34 OPT = 'ON'
35 ELSE
36 OPT = ' '
37 END IF
38 IF ((OPT(:2) .NE. 'ON') .AND. (OPT(:3) .NE. 'OFF')) THEN
39 CALL PRTERR ('CMDERR', 'Expected "ON" or "OFF"')
40 GOTO 100
41 END IF
42
43 ISON = (OPT(:2) .EQ. 'ON')
44
45 IF (INTYP(IFLD) .GE. -1) IFLD = IFLD + 1
46 RETURN
47
48 100 CONTINUE
49 IF (INTYP(IFLD) .GE. -1) IFLD = IFLD + 1
50 RETURN 1
51 END