j3-fortran / fortran_proposals

Proposals for the Fortran Standard Committee
175 stars 14 forks source link

Format statement for error stop #283

Open jacobwilliams opened 1 year ago

jacobwilliams commented 1 year ago

Here's a random idea... what if format statements were allowed for error stop?

error stop('(A,I3,A,I3)') 'error: you entered', i, 'when the correct value is ', j

Currently, you have to write everything to an intermediate string. So, it could save a few lines of code to just be able to do it this way.