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

Go to the source code of this file.

Functions/Subroutines

subroutine ancmsg (msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9)

Function/Subroutine Documentation

◆ ancmsg()

subroutine ancmsg ( integer msgid,
integer, optional msgtype,
integer anmode,
integer, optional i1,
integer, optional i2,
integer, optional i3,
integer, optional i4,
integer, optional i5,
integer, optional i6,
integer, optional i7,
integer, optional i8,
integer, optional i9,
optional r1,
optional r2,
optional r3,
optional r4,
optional r5,
optional r6,
optional r7,
optional r8,
optional r9,
character(*), optional c1,
character(*), optional c2,
character(*), optional c3,
character(*), optional c4,
character(*), optional c5,
character(*), optional c6,
character(*), optional c7,
character(*), optional c8,
character(*), optional c9 )

Definition at line 365 of file message.F.

372C-----------------------------------------------
373C M o d u l e s
374C-----------------------------------------------
375 USE message_mod2
377C-----------------------------------------------
378C Usage sample :
379C USE MESSAGE_MOD
380C ...
381C CALL ANCMSG(MSGID=9999,ANMODE=ANINFO_BLIND,
382C . I1=28,C1='TIME STEP COMPUTATION',C2='SHELL')
383C ... ... ... ... ...
384C ANMODE=ANINFO/ANINFO_BLIND
385C ANINFO write both title and description in standard output and listing
386C ANINFO_BLIND do not write description in standard output
387C ... ... ... ... ...
388C It is recommended to use ANINFO for sensitive messages.
389C ... ... ... ... ...
390C engine_message_description.txt extract :
391C ...
392C /MESSAGE/9999/TITLE
393C \n ** ERROR DURING %s\n
394C
395C /MESSAGE/9999/DESCRIPTION
396C DURING COMPUTATION IT APPEARS THAT
397C %s ELEMENT ID=%d HAD A TIME STEP EQUAL TO ZERO
398C ENGINE WILL STOP
399C-----------------------------------------------
400C I m p l i c i t T y p e s
401C-----------------------------------------------
402#include "implicit_f.inc"
403C-----------------------------------------------
404C C o m m o n B l o c k s
405C-----------------------------------------------
406#include "units_c.inc"
407#include "comlock.inc"
408C-----------------------------------------------
409C D u m m y A r g u m e n t s
410C-----------------------------------------------
411 INTEGER MSGID,ANMODE,MSGTYPE
412 integer
413 . i1,i2,i3,i4,
414 . i5,i6,i7,i8,i9
415 my_real
416 . r1,r2,r3,r4,
417 . r5,r6,r7,r8,r9
418 CHARACTER(*)
419 . C1,C2,C3,C4,
420 . C5,C6,C7,C8,C9
421 OPTIONAL ::
422 . msgtype, ! Warning : MSGTYPE is not optional in the Starter
423 . ! but is is not supported in the engine
424 . i1,i2,i3,i4,
425 . i5,i6,i7,i8,i9,
426 . r1,r2,r3,r4,
427 . r5,r6,r7,r8,r9,
428 . c1,c2,c3,c4,
429 . c5,c6,c7,c8,c9
430C-----------------------------------------------
431C L o c a l V a r i a b l e s
432C-----------------------------------------------
433 INTEGER IBUF(10)
434 my_real rbuf(10)
435 CHARACTER(LEN=NCHARLINE100):: CBUF(10)
436C
437 CHARACTER(LEN=NCHARLINE100):: TMPLINE,MYFMT,TMPBUF
438 CHARACTER(LEN=NCHAROUT) :: TMPOUT
439 INTEGER ITYPE,ILINE,I,I0,J,J0,SBUFMSG(2),IFILE,IOLD,
440 . INDXI,INDXR,INDXC,INDXTMPOUT,BUFLEN,
441 . STMP
442 CHARACTER(LEN=NCHARLINE100):: BUFMSG(2,100),BUFFMT(2,100)
443C
444 WRITE(istdo,'(/A,I10)')'MESSAGE ID : ',msgid
445 IF (iout/=0) THEN
446 WRITE(iout,'(/A,I10)')'MESSAGE ID : ',msgid
447 END IF
448 ibuf=0
449 rbuf=zero
450 cbuf=' '
451C
452 indxi=0
453 indxr=0
454 indxc=0
455C
456 tmpout=' '
457 indxtmpout=0
458 tmpbuf=' '
459C
460 IF (PRESENT(i1)) THEN
461 ibuf(1)=i1
462 IF (PRESENT(i2)) THEN
463 ibuf(2)=i2
464 IF (PRESENT(i3)) THEN
465 ibuf(3)=i3
466 IF (PRESENT(i4)) THEN
467 ibuf(4)=i4
468 IF (PRESENT(i5)) THEN
469 ibuf(5)=i5
470 IF (PRESENT(i6)) THEN
471 ibuf(6)=i6
472 IF (PRESENT(i7)) THEN
473 ibuf(7)=i7
474 IF (PRESENT(i8)) THEN
475 ibuf(8)=i8
476 IF (PRESENT(i9)) THEN
477 ibuf(9)=i9
478 END IF
479 END IF
480 END IF
481 END IF
482 END IF
483 END IF
484 END IF
485 END IF
486 END IF
487C
488 IF (PRESENT(r1)) THEN
489 rbuf(1)=r1
490 IF (PRESENT(r2)) THEN
491 rbuf(2)=r2
492 IF (PRESENT(r3)) THEN
493 rbuf(3)=r3
494 IF (PRESENT(r4)) THEN
495 rbuf(4)=r4
496 IF (PRESENT(r5)) THEN
497 rbuf(5)=r5
498 IF (PRESENT(r6)) THEN
499 rbuf(6)=r6
500 IF (PRESENT(r7)) THEN
501 rbuf(7)=r7
502 IF (PRESENT(r8)) THEN
503 rbuf(8)=r8
504 IF (PRESENT(r9)) THEN
505 rbuf(9)=r9
506 END IF
507 END IF
508 END IF
509 END IF
510 END IF
511 END IF
512 END IF
513 END IF
514 END IF
515C
516 IF (PRESENT(c1)) THEN
517 cbuf(1)=c1
518 IF (PRESENT(c2)) THEN
519 cbuf(2)=c2
520 IF (PRESENT(c3)) THEN
521 cbuf(3)=c3
522 IF (PRESENT(c4)) THEN
523 cbuf(4)=c4
524 IF (PRESENT(c5)) THEN
525 cbuf(5)=c5
526 IF (PRESENT(c6)) THEN
527 cbuf(6)=c6
528 IF (PRESENT(c7)) THEN
529 cbuf(7)=c7
530 IF (PRESENT(c8)) THEN
531 cbuf(8)=c8
532 IF (PRESENT(c9)) THEN
533 cbuf(9)=c9
534 END IF
535 END IF
536 END IF
537 END IF
538 END IF
539 END IF
540 END IF
541 END IF
542 END IF
543C
544 DO itype=1,2
545 IF (ALLOCATED(messages(itype,msgid)%MESSAGE)) THEN
546 DO iline=1,messages(itype,msgid)%SMESSAGE
547 tmpout=' '
548 tmpbuf=' '
549 tmpline=messages(itype,msgid)%MESSAGE(iline)
550 buflen=0
551 indxtmpout=0
552 i=1
553 iold=1
554! DO J0=1,LEN_TRIM(TMPLINE)
555! IF (TMPLINE(J0:J0)=='/') THEN
556! TMPLINE(J0:J0)=CHAR(10)
557! END IF
558! END DO
559 DO WHILE (i+1<=len_trim(tmpline))
560 IF (tmpline(i:i)==achar(92)) then !'\') THEN
561 i=i+1
562 IF (i-2>=1) THEN
563 WRITE(tmpbuf,'(A,A)')tmpline(iold:i-2),tmpline(i:i)
564 buflen=i-2-iold+1+1
565 ELSE
566 WRITE(tmpbuf,'(A)')tmpline(i:i)
567 buflen=1
568 END IF
569 i=i+1
570 iold=i
571 ELSE IF (tmpline(i:i)=='%') THEN
572 i=i+1
573 IF (i-2>=1) THEN
574 WRITE(tmpbuf,'(A)')tmpline(iold:i-2)
575 buflen=i-2-iold+1
576 IF (buflen>0) THEN
577 tmpout=tmpout(1:indxtmpout)//tmpbuf(1:buflen)
578 indxtmpout=indxtmpout+buflen
579 buflen=0
580 END IF
581 END IF
582 IF (tmpline(i:i)=='d') THEN
583 i=i+1
584 iold=i
585 myfmt='(I10)'
586 IF (indxi<10) indxi=indxi+1
587 WRITE(tmpbuf,myfmt)ibuf(indxi)
588 tmpbuf=adjustl(tmpbuf)
589 buflen=len_trim(tmpbuf)
590 ELSE IF (tmpline(i:i)=='f') THEN
591 i=i+1
592 iold=i
593 myfmt='(1PG20.13)'
594 IF (indxr<10) indxr=indxr+1
595 WRITE(tmpbuf,myfmt)rbuf(indxr)
596 tmpbuf=adjustl(tmpbuf)
597 buflen=len_trim(tmpbuf)
598 ELSE IF (tmpline(i:i)=='s') THEN
599 i=i+1
600 iold=i
601 myfmt='(A)'
602 IF (indxc<10) indxc=indxc+1
603 WRITE(tmpbuf,myfmt)cbuf(indxc)
604 tmpbuf=adjustl(tmpbuf)
605 buflen=len_trim(tmpbuf)
606 END IF
607 ELSE
608 i=i+1
609 END IF
610 IF (buflen>0) THEN
611 tmpout=tmpout(1:indxtmpout)//tmpbuf(1:buflen)
612 indxtmpout=indxtmpout+buflen
613 buflen=0
614 END IF
615 END DO
616 IF (iold<=i) THEN
617 WRITE(tmpbuf,'(A)')
618 . tmpline(iold:len_trim(tmpline))
619 buflen=len_trim(tmpline)-iold+1
620 IF (buflen>0) THEN
621 tmpout=tmpout(1:indxtmpout)//tmpbuf(1:buflen)
622 indxtmpout=indxtmpout+buflen
623 buflen=0
624 END IF
625 END IF
626! #include "lockon.inc"
627 IF (indxtmpout>0) THEN
628C do not write description on stdout in case ANINFO_BLIND
629 IF (anmode/=aninfo_blind.OR.itype==1) THEN
630 WRITE(istdo,'(A)')tmpout(1:indxtmpout)
631 END IF
632 IF (iout/=0) THEN
633 WRITE(iout,'(A)')tmpout(1:indxtmpout)
634 END IF
635 END IF
636! #include "lockoff.inc"
637 END DO
638 END IF
639 END DO
640 RETURN
#define my_real
Definition cppsort.cpp:32
integer aninfo_blind
type(tmessage), dimension(:,:), allocatable messages
integer, parameter ncharline100