pull down to refresh
program weather_report
implicit none
character(len=*), parameter :: msg = "날씨가 좋아요."
call say_weather(msg)
contains
subroutine say_weather(text)
implicit none
character(len=*), intent(in) :: text
write(*,'(A)') trim(text)
end subroutine say_weather
end program weather_reportEdit: I used to use this syntax, though:
PROGRAM WEATHER_REPORT
CHARACTER*40 MSG
INTEGER I
MSG = '날씨가 좋아요.'
I = 1
10 IF (I .GT. 1) GOTO 20
CALL SAYWEATHER(MSG)
I = I + 1
GOTO 10
20 STOP
END
SUBROUTINE SAYWEATHER(TEXT)
CHARACTER*40 TEXT
30 PRINT *, TEXT
GOTO 40
40 RETURN
ENDreply
reply
Nope, not trying to get muted. I just played along with your jab at Fortran.
Seems like you take things literally, so let me do the same.
why the fuck are you coping with that old crap
Because it works, is faster than many other codes, and it is just not worth it to rewrite legacy code.
reply
same.why the fuck are you coping with that old crap
Because it works, is faster than many other codes, and it is just not worth it to rewrite legacy code.
my least favorite "just a chill dude" advice is "plan to throw one away; you will, anyway"
hearing that from a professional C++ barf cope artist, about a Common Lisp hairball, is honestly insulting.
please believe me, I honestly have a lot of respect for people who maintain codebases older than their children.
reply
@south_korea_ln how's the weather, in any other language?