fypp icon indicating copy to clipboard operation
fypp copied to clipboard

Add import directive

Open meteospike opened this issue 1 year ago • 1 comments

Since it is an independent extra feature, it may not be necessary to add a new command line flag. The principal change is probably moving ahead the sequence evaluating the list of modules directories.

Here is an example of the new directive :

program pm_dble
#:import pm, foo
  integer :: i=${int(pm.pm_two+foo.foovar)}$
  write(6,*) 'Begin DBLE'
  write(6,*) 'i =', i
  write(6,*) 'End DBLE'
end program pm_dble

meteospike avatar Sep 18 '24 15:09 meteospike

I just went over the PR once more (sorry for the long delay). Are you still interested to work on it? The module path manipulation issue still needs to be fixed (setting back the original path after importing the user specified modules) and tests are missing.

aradi avatar Oct 29 '25 11:10 aradi