2021年4月27日星期二

Fortran: If statement with two commands on the same line

In fortran, in a single line, I want to execute two commands after an if, like shown below.

if (.true.) err = 'my error message' AND return  

Is this possible? Using an if (.true.) then ... takes 4 whole lines!

https://stackoverflow.com/questions/67294059/fortran-if-statement-with-two-commands-on-the-same-line April 28, 2021 at 01:06PM

没有评论:

发表评论