The attached fortran source file can not be compiled if the Format Statement is located before the assignment y = ... The error does not occur if the Format Statement is moved behind the assignment.
[color=red:48c18de582] Subroutine Fehler(x, y) Implicit None Integer, Intent(in) :: x Integer, Intent(out) :: y Character (Len=20) :: Text
1000 Format('Test:', I10)
y = Quadrat(x)
!\($$\) 1000 Format('Test:', I10)
Write(Text, 1000) y
Contains
Integer Function Quadrat(Value) Integer, Intent(in) :: Value Quadrat = Value * Value End Function Quadrat
End Subroutine Fehler[/color:48c18de582]