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

Go to the source code of this file.

Functions/Subroutines

subroutine stock_msg (id, itype, sbufmsg, bufmsg)

Function/Subroutine Documentation

◆ stock_msg()

subroutine stock_msg ( integer, intent(in) id,
integer, intent(in) itype,
integer, intent(in) sbufmsg,
character(len=ncharline100), dimension(sbufmsg), intent(in) bufmsg )

Definition at line 31 of file stock_msg.F.

32C-----------------------------------------------
33C M o d u l e s
34C-----------------------------------------------
35 USE message_mod
37C-----------------------------------------------
38C I m p l i c i t T y p e s
39C-----------------------------------------------
40#include "implicit_f.inc"
41C-----------------------------------------------
42C D u m m y A r g u m e n t s
43C-----------------------------------------------
44 INTEGER,INTENT(IN) :: ID,ITYPE,SBUFMSG
45 CHARACTER(LEN=NCHARLINE100), INTENT(IN) :: BUFMSG(SBUFMSG)
46C-----------------------------------------------
47C L o c a l V a r i a b l e s
48C-----------------------------------------------
49 INTEGER I,J,JDX,IBACKSLASH
50C-----------------------------------------------
51C S o u r c e L i n e s
52C-----------------------------------------------
53 IF (ALLOCATED(messages(itype,id)%MESSAGE)) THEN
54 DEALLOCATE(messages(itype,id)%MESSAGE)
55 END IF
56 IF (sbufmsg==0) THEN
57 messages(itype,id)%SMESSAGE=1
58 ALLOCATE(messages(itype,id)%MESSAGE(1))
59 IF (itype==1) THEN
60 messages(itype,id)%MESSAGE(1)=' !!! EMPTY TITLE !!! '
61 ELSE IF (itype==2) THEN
62 messages(itype,id)%MESSAGE(1)=' !!! EMPTY DESCRIPTION !!! '
63 END IF
64 ELSE
65 ALLOCATE(messages(itype,id)%MESSAGE(sbufmsg))
66 messages(itype,id)%SMESSAGE=sbufmsg
67 DO i=1,sbufmsg
68 jdx=1
69 messages(itype,id)%MESSAGE(i)=' '
70 j=1
71 DO WHILE(j<=ncharline100)
72 IF (bufmsg(i)(j:j)==achar(92)) then !'\') THEN
73C => skip \ print next
74 IF (j<ncharline100) THEN
75 j=j+1
76 IF (bufmsg(i)(j:j)=='n') THEN
77 messages(itype,id)%MESSAGE(i)(jdx:jdx)=char(10)
78 jdx=jdx+1
79C add here other special cases
80 ELSE
81C keep back slash for further use
82 messages(itype,id)%MESSAGE(i)(jdx:jdx)= bufmsg(i)(j-1:j-1)
83 jdx=jdx+1
84 messages(itype,id)%MESSAGE(i)(jdx:jdx)= bufmsg(i)(j:j)
85 jdx=jdx+1
86 END IF
87 ELSE
88C => end of loop
89 j=j+1
90 END IF
91 ELSE
92 messages(itype,id)%MESSAGE(i)(jdx:jdx)=bufmsg(i)(j:j)
93 jdx=jdx+1
94 END IF
95 j=j+1
96 END DO
97 END DO
98 END IF
initmumps id
integer, parameter ncharline100