Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Fortran 90: giving the variable's value on the execution of a program

  1. May 2, 2012 #1

    I wondered if in Fortran 90 I can define a variable whose value will be given only while executing the program, in the same line as the execution command, for example like this:

    ./exe 100

    I know one can use the "read" command, but that way you only enter the variable's value once the program is executed (in a new line)

    I tried to Google it but I'm new to Fortran and I'm not sure to know the right terms to look for it efficiently.

  2. jcsd
  3. May 2, 2012 #2


    User Avatar

    Staff: Mentor

    Try Googling for

    fortran 90 command line arguments

    The first page has several references that look promising.
  4. May 2, 2012 #3
    Thanks jtbell! It works now :)
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook