getmdserrortext Subroutine

public subroutine getmdserrortext(status, text)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: status
character(len=*) :: text

Contents

Source Code


Source Code

  subroutine getmdserrortext(status,text)
    implicit none
    logical, intent(in) :: status
    character(*) :: text ! intent?
# ifdef MDSPLUS
    logical loc_status
    integer istat
    equivalence (loc_status,istat)
    integer length
    integer :: descr
    loc_status = mdsvalue("getmsg($)",descr(IDTYPE_LONG,status,0),&
         &descr(IDTYPE_CSTRING,text,0,len(text),0),0,length)
    if (iand(istat,1) .eq. 0) then
       loc_status = status
       write(text,*) "error status = ",istat
    endif
    return
# endif
  end subroutine getmdserrortext