! File: achar_test.f90 ! Public domain 2005 James Van Buskirk ! achar seems to work OK in gfortran, but declarations and ! operations with character arrays are problematic. ! Check warnings you get for achar(256) vs. achar(128) program achar_test implicit none integer i character(*), parameter :: y(0:31) = (/(achar(i),i=64,95)/) character(2), parameter :: z(2,2) = achar(reshape((/65,66,67,68/),(/2,2/))) write(*,*) y write(*,*) len(z) write(*,*) z end program achar_test