So my Twitter feed gets posts when Dr Fortran posts to his twitter feed, I was stuck by one a few days ago that somehow referenced the FORTLANG group.
I have never been on the Fortran Language group, there are to many feeds, but I decided to have a look. Someone on the Fort Lang had put up an interesting little program to start other programs using a TYPE command. I thought the notes on the program said they were having trouble with it.
Being your average curious guy, "look Ma - no hands" I copied the program and I had a sample project I just stick stuff into when I am curious. The program gave me errors on missing ISO_VARYING_STRING, which upon finding and loading into the project only had one error on build. There was a misspelt variable.
The program runs nicely, but I was intrigued, how can a TYPE contain procedures, that is a new one on me.
Here is the code, it is Sunday afternoon and I am to lazy to go and find the string of links that got me to the code. I will hunt it out on a workday.
THIS IS NOT MY CODE IT IS PUBLISHED ON FORT LANG, I fixed one line and added the ISO etc file.
You could almost use this as a watcher program. My current watcher program fails on some Intel NUCs.
Ah, so you discovered type-bound procedures! Those have been in the language since F2003.
ISO_VARYING_STRING was an "optional" part of Fortran 95. It used pointer components since allocatable components were not allowed until F2003. Someone did rewrite it to use allocatable components. It is largely subsumed by allocatable, deferred-length character from F2008 and was withdrawn from the standard. I'm not sure any major compiler included a copy.
@Steve_Lionel wrote: .. ISO_VARYING_STRING was an "optional" part of Fortran 95. .. It is largely subsumed by allocatable, deferred-length character from F2008 ..
Deferred length CHARACTER ALLOCATABLE facility was introduced in Fortran 2003 standard revision, not 2008.
I am the author of the small command program. It was just a small weekend experiment of mine. I'm glad you found the project interesting.
With some more work I think it is possible to build a pretty decent Fortran command API. Unfortunately I lack the system programming knowledge to complete the job. Maybe in a few months (cough years), I get back to finish it.
I would be happy to learn more about your watcher program? What do you use it for and how does it work?