Comments (8)
I think I should rephrase my question: I see in class FortranInterface(FortranContainer)
, in sourceform.py, that this class already includes
self.abstract = bool(line.group(1))
My question is whether this is already a complete implementation or only a preliminary placeholder.
I think that abstract interfaces are much more like types rather than overloaded interfaces, and maybe it would make sense to treat them separately providing a list, and having them processed in two templates like
aint_list.html aint_page.html
Marco
from ford.
Okay, two things here really. As it stands, FORD is supposed to be able to process abstract interfaces. I'll have to take a look at what's going wrong there. As I've never used abstract interfaces in any of my own programs I may have forgotten to test that feature.
The other issue is how to display abstract interfaces. I take your point that they are more like a type than a normal interface. At some point (no guarantees as to when) I'll add the ability to handle them a bit differently from other interfaces. I'll certainly make a list of abstract interfaces, although I'm not sure that I'll need a whole new aint_page.html template.
from ford.
Okay, I found the bug which was causing FORD to crash. It was a silly little mistake on my part that was easy enough to fix. I'll push the changes up to Github and create a new patch-level release on PyPI.
from ford.
Very nice, thanks! This indeed suites my needs; while looking at it anyway I add a small nitpicking observation.
The point is that maybe handling the "abstract interface" block as such is a suboptimal solution compared to handling each one of the interface-bodies separately. Here is an example:
module m
implicit none
public :: i_s
private :: i_f1, i_f2
abstract interface
subroutine i_s(x)
!! Define the abstract interface for all the functions used in this
!! program.
integer, intent(inout) :: x
end subroutine i_s
!> Another interface for all the functions
pure function i_f1(x) result(y)
integer, intent(in) :: x
real :: y
end function i_f1
end interface
abstract interface
!> Similar to `i_f1`, buth in a separate interface block
pure function i_f2(x) result(y)
integer, intent(in) :: x
real :: y
end function i_f2
end interface
end module m
Here, ford lists i_f1 among the public entities of the module, since it happens to appear in the same abstract interface block as i_s. However, i_f1 is private, and the abstract interface is not private nor public. i_f2, which is exactly like i_f1, is treated correctly because it is placed in a different abstract interface block.
from ford.
I see what you mean. At some point I'll fix that. However, it might be several months. I really need to be devoting more time to my thesis, so for the next while I'll only be working on FORD to fix any bugs which people identify.
from ford.
Sure, good luck four your thesis!
Maybe if I have time I will try to put together something and make a pull request, just in case/when/if you will have time to consider it.
Marco
from ford.
I've reworked how interfaces are handled and I think you will now find abstract interfaces behave much more in line with how you'd like. Non-abstract interfaces are handled better now, too. I have only done some simple tests, so if you come across any bugs, let me know. You can find these improvements in the GitHub repository; they aren't on PyPI yet but should be within a day or two.
from ford.
These changes are now available on PyPI.
from ford.
Related Issues (20)
- Broken links in description on lists pages HOT 1
- Problem with the link in the header menu HOT 2
- Navigation Bar Issue: Incorrect Link Path for 'Program' on Derived Types Pages HOT 4
- New zenodo entry? HOT 1
- "external" links broken? HOT 3
- Ford crashes even with --force when `e.args` tuple has zero length in `fortran_project.Project.__init__` HOT 1
- Derived-types declared in submodules are missing HOT 6
- Parser failure in associate block with []-arrays
- Division by zero exception in lines_description of sourceform.py HOT 4
- Some attributes are missing from derived types
- Option coloured_edges is broken HOT 1
- Can't link from a page to source code HOT 3
- Bug in logic to skip big or incomplete graphs HOT 1
- Graphs with long edge labels become degenerated HOT 5
- show_proc_parent is ignored HOT 2
- Create FAQ
- Feature request: Option to turn off certain homepage components HOT 1
- Idea: "Source File" link to GitHub
- Update to fontawesome v6 HOT 2
- Fortran keywords are highlighed in a regular preformatted code block HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ford.