Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26734 Discussions

Using a variable from another f.90 file

Lee__TY
Beginner
77 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