Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
13 Views

Using a variable from another f.90 file

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