Silverfrost Forums

Welcome to our forums

Puzzling Error Message

14 Jan 2026 2:35 (Edited: 14 Jan 2026 2:39) #32704

This short program has a bug: it passes a literal integer as an actual argument to a subroutine that redefines the dummy argument.

program tst
          print 10,'Before',1,2,3
          call sub(1,2,3)
          print 10,'After ',1,1,1
       10 format(a6,3i5)
          end
          subroutine sub(i,j,k)
          i=j+k
          return
          end

When I compile and run with /64 test.f /lgo, the output is reasonable:
 
   Program entered
    Before    1    2    3
    After     5    5    5

Repeating without "/64", I see:

    Program entered
    Before    1    2    3
    FORMAT mismatch: I-Format with CHARACTER item (at data position 2). 00401000 TST [+0154]

This is puzzling, because in the program the I/O list matches the Format exactly.
15 Jan 2026 7:44 #32709

mecej4

I have logged this for investigation.

Please login to reply.