OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
redkey1.F File Reference
#include "implicit_f.inc"
#include "chara_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine redkey1 (key, key0, nkey, carte, ikey, ir)

Function/Subroutine Documentation

◆ redkey1()

subroutine redkey1 ( character, dimension(*) key,
character, dimension(nkey) key0,
integer nkey,
character(len=ncharline100) carte,
integer ikey,
integer ir )

Definition at line 30 of file redkey1.F.

31C-----------------------------------------------
32C M o d u l e s
33C-----------------------------------------------
35C-----------------------------------------------
36C I m p l i c i t T y p e s
37C-----------------------------------------------
38#include "implicit_f.inc"
39C-----------------------------------------------
40C C o m m o n B l o c k s
41C-----------------------------------------------
42#include "chara_c.inc"
43C-----------------------------------------------
44C D u m m y A r g u m e n t s
45C-----------------------------------------------
46 INTEGER NKEY, IKEY, IR, IOK
47 CHARACTER(LEN=NCHARLINE100) :: CARTE
48 CHARACTER KEY(*)*5, KEY0(NKEY)*5
49C-----------------------------------------------
50C L o c a l V a r i a b l e s
51C-----------------------------------------------
52 INTEGER IKEYO, J, JK, I
53 CHARACTER KEYO(9)*5
54 LOGICAL DETECTED
55C-----------------------------------------------
56 ir=0
57C
58 ikeyo=ikey
59 DO j=1,9
60 keyo(j)=key(j)
61 key(j)=' '
62 ENDDO
63 jk=0
64 DO i=1,ncharline100
65 IF(carte(i:i)=='/')THEN
66 jk=jk+1
67 j=0
68 ELSEIF(carte(i:i)/=' ')THEN
69 j=j+1
70 IF(j<=5)key(jk)(j:j)=carte(i:i)
71 ENDIF
72 ENDDO
73
74 detected=.false.
75 DO i=1,nkey
76 ikey=i
77 IF(key(1)==key0(ikey))THEN
78 detected = .true.
79 EXIT
80 ENDIF
81 ENDDO
82
83 IF(.NOT. detected)THEN
84 ir=1
85 ikey=ikeyo
86 DO j=1,9
87 key(j)=keyo(j)
88 ENDDO
89
90 ELSE ! IF(DETECTED)
91 iok = 0
92 j=0
93 IF(ikey==1.OR.ikey==58)THEN
94 IF (got_input == 0.OR.ikey==58) THEN
95 DO i=5,ncharline100
96 IF(iok==0.AND.carte(i:i)=='/')THEN
97 iok = 1
98 ELSEIF(iok==1.AND.carte(i:i)=='/')THEN
99 rootlen = j
100 RETURN
101 ELSEIF(iok==1.AND.carte(i:i)/=' ')THEN
102 j=j+1
103 IF(j<=80)rootnam(j:j)=carte(i:i)
104 ENDIF
105 ENDDO
106 ELSE
107 rootnam(1:lenrootn)=rootn(1:lenrootn)
108 rootlen = lenrootn
109 ENDIF
110 ENDIF
111 ENDIF
112
113 RETURN
integer, parameter ncharline100