character*(*) function chival (number) integer number c ************************************************************** c * an integer*4 is supplied in NUMBER, this function will plant it c * into the CHIVAL character string - right justified c * will put in stars if number is too large c c ************************************************************** c This statement will produce a similar result in DEC Fortran cjw write (chival, '(i)') number cjw cjwccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc cjwc cjwc Here is an attempt to produce a similar result in standard Fortran c 77 cjwc cjwc character*11 result cjwc cjwc write (result, '(i11)') number cjwc lc = len(chival) cjwc if (lc .lt. 11) then cjwc ns = 11 - lc cjwc if (result(ns:ns) .eq. ' ') then cjwc chival = result(ns+1:) cjwc else cjwc do i = 1, lc cjwc chival(i:i) = '*' cjwc end do cjwc end if cjwc else if (lc .gt. 11) then cjwc chival(:lc-11) = ' ' cjwc chival(lc-10:) = result cjwc else cjwc chival = result cjwc end if cjwcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccc character*11 result ccc ccc write (result, '(i11)') number ccc lc = len(chival) ccc if (lc .lt. 11) then ccc ns = 11 - lc ccc if (result(ns:ns) .eq. ' ') then ccc chival = result(ns+1:) ccc else ccc do i = 1, lc ccc chival(i:i) = '*' ccc end do ccc end if ccc else if (lc .gt. 11) then ccc chival(:lc-11) = ' ' ccc chival(lc-10:) = result ccc else ccc chival = result ccc end if call chvxi(number,chival,10) return end