Converting character string to integer

前端 未结 2 1051
醉话见心
醉话见心 2021-01-24 02:38

This is a follow up to my get_command_argument() question.

I\'m reading a command line argument (arg) into a Fortran program. Then I want to store the value

2条回答
  •  粉色の甜心
    2021-01-24 02:54

    You want to use the "internal files" capability. You should have a statement like read(arg,*) j. This will read the character variable arg as if it were a file and store the result into j.

提交回复
热议问题