Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28381 Discussions

Using a variable from another f.90 file

Lee__TY
Beginner
217 Views

Hello everyone,

A part of my.f90 file is shown below

read*, wl
          if (wl == 1) then
              write(*,*) 'blah blah...'
              wl = 1
                        
          elseif (wl == 2) then
              write(*,*) 'blah blah...'
              wl = 2
                           
          else
              write(*,*) 'blah blah...'

          endif

I would like to use this wl value in another f.90 file that has an equation.

I want to set it as a variable within the equation(ex. x = wl +2)

How can I use this value in another f.90 file? 

Please help me step by step.

Thank you so much!

Have a great day!

 

0 Kudos
0 Replies
Reply