Re: Huge program, no interfaces, ugh
In message <1170263701.807339.186740@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Beliavsky <beliavsky@xxxxxxx> writes
You could put all the code for functions and subroutines in a module
foo
and insert "use foo" in the main program -- doing so provides an
explicit
interface.
That's a good idea in principle, but if it is old code it probably
doesn't have the required END SUBROUTINE or END FUNCTION statements.
That's what thwarted me when in a similar predicament. You may be able
to fix that with a good text editor, but it can be hard work.
It looks like you are working with a FORTRAN 77 code -- the free
program
FTNCHEK is invaluable for checking interfaces.
I'd strongly recommend that option for Fortran77-style code. Indeed I'd
never trust old code without doing a such a check. Some of the warnings
may be unimportant, but looking through them nearly always brings
problems to light that desperately need fixing.
--
Clive Page
.
Relevant Pages
- Re: 7.0 wishlist?
... The "auto-implement" is intended mainly for the odd situation where an existing class you can't edit fits some interface and you're willing to take responsibility for it if it turns out not to actually adhere to the contract, and try using it where that interface type is expected. ... If reference declarations started showing up with the odd asterisk, bang, or other punctuation mark on it, but never primitive declarations, people would probably be able to guess what was going on, on the basis of "what other binary flag might be set on references but not primitives and would be really useful besides can be/cannot be null?" ... the compiler cannot prove by static analysis that the RHS isn't null might be a good idea. ... Object foo, bar; ... (comp.lang.java.programmer) - Re: OO Design induces an existential crisis
... use of a conceptual basis for creating interface boundaries. ... So, if we pick on the Open-Closed principle, would that be enough to break ... > move it to a different node on the tree and reshuffle the hierarchy. ... Or is factoring out duplication NOT one of ... (comp.object) - Re: OO Design induces an existential crisis
... > use of a conceptual basis for creating interface boundaries. ... >> And, some of the are vague, such as Open-Closed Principle. ... >> move it to a different node on the tree and reshuffle the hierarchy. ... Or is factoring out duplication NOT one of ... (comp.object) - Re: we have a "this" keyword, but what if... we also had "component" keyword??
... > Now client depends on MyPackage component which serves as a facade. ... But each of these is a standalone object with its own interface. ... responsibilities a Facade object has is re-dispatching messages. ... one of my problems with the original example for Component is that [Foo] ... (comp.object) - Re: 7.0 wishlist?
... This is a slight modifier that would be very common on reference declarations, so it would be good to economize on typing or visual clutter where it was used. ... which has the enum constants actually singleton instances of same-named subclasses. ... enum Foo ... The point being to allow to publish an interface ... (comp.lang.java.programmer) |
|