title: Problem with Array Sorting and Printing it sideways in Fortran 95
body: <p>I am trying to take my array of numbers based on a variable that determines its size and sort it. </p>
  
  <p>The array is created using the random numbers seed on Fortran 95. However when I try to sort it I run into big trouble. It compiles fine, but the array is printed with a lot of asterisks in it.</p>
  
  <p>In addition I wanted to print my array sideways, (for instance something like this: 1 2 3 4 etc.) but I even failed at doing that. I realize that it must be done using the Advance="no" within a DO loop, but apparently that is erroneous as well.</p>
  
  <p>Below is the code that I am using. If anyone is willing to let me know where I may be wrong I would be very grateful. Thanks for your time.</p>
  
  <pre><code>    SUBROUTINE Sorter(num, numinteger)
  
      INTEGER, INTENT(OUT):: num(100)
      INTEGER, INTENT(IN):: numinteger
  
      DO i=1, (numinteger-1)
          min=num(i)
          pos=i
          DO j=i,numinteger
              IF (num(j)&lt;min)THEN
                  min=num(j)
                  pos=j
              END IF
          END DO
          temp=num(i)
          num(i)=min
          num(pos)=temp
      END DO
      PRINT*, " "
      PRINT*, "Sorted Numbers"
      DO i=1, numinteger
      WRITE(*,23,ADVANCE="NO") num
      23 FORMAT (I2)
      END DO   
      END SUBROUTINE
  </code></pre>
  
  <p>Thanks!</p>