#include "implicit_f.inc"
Go to the source code of this file.
◆ stock_msg()
| subroutine stock_msg |
( |
integer, intent(in) | id, |
|
|
integer, intent(in) | itype, |
|
|
integer, intent(in) | sbufmsg, |
|
|
character(len=ncharline), dimension(sbufmsg), intent(in) | bufmsg ) |
Definition at line 30 of file stock_msg.F.
31
32
33
36
37
38
39#include "implicit_f.inc"
40
41
42
43
44
45
46 INTEGER,INTENT(IN) :: ID,ITYPE,SBUFMSG
47 CHARACTER(LEN=NCHARLINE), INTENT(IN) :: BUFMSG(SBUFMSG)
48
49
50
51 INTEGER I, J, JDX
52 CHARACTER*1, PARAMETER :: BACKSLASH = char(92)
53
54
55
56 IF (
ALLOCATED(messages(itype,
id)%MESSAGE))
THEN
57 DEALLOCATE(messages(itype,
id)%MESSAGE)
58 END IF
59 IF (sbufmsg==0) THEN
60 messages(itype,
id)%SMESSAGE=1
61 ALLOCATE(messages(itype,
id)%MESSAGE(1))
62 messages(itype,
id)%MESSAGE(1)=
' '
63 ELSE
64 ALLOCATE(messages(itype,
id)%MESSAGE(sbufmsg))
65 messages(itype,
id)%SMESSAGE=sbufmsg
66 DO i=1,sbufmsg
67 jdx=1
68 messages(itype,
id)%MESSAGE(i)=
' '
69 j=1
71 IF (bufmsg(i)(j:j)==backslash) THEN
72
74 j=j+1
75 IF (bufmsg(i)(j:j)=='n') THEN
76 messages(itype,
id)%MESSAGE(i)(jdx:jdx)=char(10)
77 jdx=jdx+1
78
79 ELSE
80
81 messages(itype,
id)%MESSAGE(i)(jdx:jdx)=bufmsg(i)(j-1:j-1)
82 jdx=jdx+1
83 messages(itype,
id)%MESSAGE(i)(jdx:jdx)=bufmsg(i)(j:j)
84 jdx=jdx+1
85 END IF
86 ELSE
87
88 j=j+1
89 END IF
90 ELSE
91 messages(itype,
id)%MESSAGE(i)(jdx:jdx)=bufmsg(i)(j:j)
92 jdx=jdx+1
93 END IF
94 j=j+1
95 END DO
96 END DO
97 END IF
98 RETURN
integer, parameter ncharline