forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FTN95 options

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
kaliuzhkin



Joined: 17 Sep 2012
Posts: 33

PostPosted: Wed Aug 26, 2015 10:56 pm    Post subject: FTN95 options Reply with quote

I am new at using FTN95 and am struggling with the options. My computer does not have Visual Studio and I doubt if it has .NET. I suppose its Win32.

What options should I select in order to produce object files? /
-CLR and /-LINK?

I'm an oldtime programmer and in the 1970's, I worked professionally as a scientific programmer. Boy, have things changed!

Dan Kalish
Back to top
View user's profile Send private message Send e-mail
IanLambley



Joined: 17 Dec 2006
Posts: 490
Location: Sunderland

PostPosted: Thu Aug 27, 2015 12:50 pm    Post subject: Reply with quote

Try using Plato instead of visual studio.
Create a new project, select all your source files, you may have to change the type to ".for" as this is not the default.

Put WINAPP as the first line of your main program.

Then use the "Project, Properties" menu option set all the switches you might need. First start with:
Configuration: Checkmate
Platform: Win32

Then use the build menu option to Build, Rebuild or Start Run.

Regards
Ian

Ah! programming in the 1970s.... Such memories.
Back to top
View user's profile Send private message Send e-mail
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Thu Aug 27, 2015 9:55 pm    Post subject: Reply with quote

Perhaps Silverfrost has to create Youtube presentation "Getting Started" as well as a guide on the website. The "Teardown of iPhone6" or "Teardown iPad" by iFixit on website and YouTube are good examples. Important to create that i think just right now as the students return to the classes and engineers and scientists to their labs from vacations.
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Sun Aug 30, 2015 5:31 am    Post subject: Reply with quote

If you are an oldtime programmer, you probably know about dos boxes or cmd.exe.

Assuming your program is called "test.f95" for free format or "test.for" for old fixed format code layout:

You can compile the program using the command : FTN95 test
This will produce a file "test.obj" or some error messages. You will also probably get some warning messages, which don't stop the .obj file from being created.

If the program does compile, there are a number of ways to run it or produce a .exe file. options are:

FTN95 test /LGO
FTN95 test /LINK
SLINK test.obj (SLINK is the linker for FTN95)

Note that this is not unix/Linux so options start with a / and case is not important.

Probably the best way to start is to use
FTN95 test /check /lgo ( this may start SDBG if you have run time errors )
or
FTN95 test /debug /link

FTN95 /? will give you a list of all the options.

RTFM for compiler options and for SLINK or SDBG and you will find a lot more info.

If none of this works, then check your PATH. You probably don't have the environment variables set correctly.
see C:\Program Files (x86)\Silverfrost\ftn95\fvars.bat for details.

Good luck,

John
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Sun Aug 30, 2015 12:02 pm    Post subject: Reply with quote

There are several major options for "Getting Started" with this compiler, using or not Plato and using or not MS Dev Studio.

For English speaking developers of this compiler this would not be as hard to cover all of them in short "Getting Started in 3 minutes" movies and few easy looking web pages with pictures
Back to top
View user's profile Send private message
kaliuzhkin



Joined: 17 Sep 2012
Posts: 33

PostPosted: Tue Sep 01, 2015 9:32 pm    Post subject: different objective Reply with quote

Okay, I've gotten somewhere, but now for some different objectives and additional questions:

I've gotten somewhere with Plato, but ...

Using Plato as an editor, it doesn't do much for fixed format positioning. The tabs are at 0.5", 1.0", etc. And, the tabs get interpreted as spaces. So, even if I start a statement at [tab][tab], the compiler reads it as position 0.3". This doesn't have any advantage over editing with Notebook.

If I compile from Plato, I don't get a list file, even though FTN95.cfg includes /LIST. I have to compile from the command prompt and then review the *.LIS file in Plato.

Back to the command prompt, sometimes I'd like the compiler to generate *.obj files but NOT link them. E.g., if my source files must be separately compiled and then linked together, say, with SLINK. What command does that?

Anyway, this is far easier than JCL Smile

Lastly, where is an online reference to Fortran statements? I've got a couple of books but there must be some online reference.

Thanks
Back to top
View user's profile Send private message Send e-mail
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Wed Sep 02, 2015 1:07 am    Post subject: Reply with quote

I do not use Plato because I did not like its TAB options there but after discussing thiis issue here i thought it was fixed, no?

To get OBJ file using command prompt just type: FTN95 FILENAME.FOR (the letters do not have to be capital) for fixed source formats or FTN95 FILENAME for free sources (you do not need extension if it is F95 instead of FOR or F on any other) and this will generate you FILENAME.OBJ
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Wed Sep 02, 2015 1:07 am    Post subject: Re: different objective Reply with quote

kaliuzhkin wrote:

Back to the command prompt, sometimes I'd like the compiler to generate *.obj files but NOT link them. E.g., if my source files must be separately compiled and then linked together, say, with SLINK. What command does that?
Thanks

The sequence of commands
Code:
ftn95 file1.f90
ftn95 file2.f90

will produce file1.obj, file2.obj, and will not call the linker.
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Wed Sep 02, 2015 12:05 pm    Post subject: Reply with quote

kaliuzhkin wrote
Quote:
Lastly, where is an online reference to Fortran statements? I've got a couple of books but there must be some online reference.


For many years I have utilised the Fortran 95 language reference at Lahey. You can find it at:
http://www.lahey.com/docs/LangRefEXP73_revG05.pdf

It is a very useful and concise record of all Fortran statements.

John
Back to top
View user's profile Send private message
kaliuzhkin



Joined: 17 Sep 2012
Posts: 33

PostPosted: Wed Sep 02, 2015 7:31 pm    Post subject: Reply with quote

http://www.lahey.com/docs/LangRefEXP73_revG05.pdf is a bad link. However, I found and downloaded LF Fortran Express
User’s Guide
Revision D.05
Back to top
View user's profile Send private message Send e-mail
kaliuzhkin



Joined: 17 Sep 2012
Posts: 33

PostPosted: Wed Sep 02, 2015 7:34 pm    Post subject: Re: Reply with quote

Do I position "WINAPP" before or after the PROGRAM or SUBROUTINE statement?

[quote="IanLambley"]Try using Plato instead of visual studio.
Create a new project, select all your source files, you may have to change the type to ".for" as this is not the default.

Put WINAPP as the first line of your main program.

Then use the "Project, Properties" menu option set all the switches you might need. First start with:
Configuration: Checkmate
Platform: Win32

Then use the build menu option to Build, Rebuild or Start Run.

Regards
Ian

Ah! programming in the 1970s.... Such memories.[/quote]
Back to top
View user's profile Send private message Send e-mail
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Thu Sep 03, 2015 3:49 am    Post subject: Reply with quote

See this recent thread for examples of code with the WINAPP directive:
http://forums.silverfrost.com/viewtopic.php?t=3072&postdays=0&postorder=asc&start=0 .
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Thu Sep 03, 2015 5:28 pm    Post subject: Reply with quote

I remember when the PROGRAM statement wasn't required, as any block of code NOT starting with SUBROUTINE or FUNCTION was assumed to be the main program routine, and several Fortran errors would often lead to 'Duplicate main programs' messages.

You can use directive for FTN95 in several places in your source code, but most prominently at the front, which is where WINAPP goes. You don't need WINAPP of course, in which case your program will execute in DOS mode (character mode, in a DOS box, in a command window or in Windows shell, the precise nomenclature depending on which version of windows you use). If you do use WINAPP, you have access to all sorts of Windows things through the agency of Clearwin+, and your 70s codes can be turned into Windows applications. Note that FTN95 does not have some things you may remember from back then, but it has lots that have been developed since.
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Thu Sep 03, 2015 8:07 pm    Post subject: Reply with quote

John's link to the Lahey manual is not bad, it works fine for me !
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Fri Sep 04, 2015 8:01 pm    Post subject: Reply with quote

This post/question highlights one of the main criticisms of FTN95 by users of all levels, namely documentation.

Note that what follows is not a damning criticism of FTN95 documentation, Paul has always said that they are fully aware of the shortcomings in the various documentations. The question posed here though does illustrate well the 'barrier' that a lack of better structured documentation poses for maybe all new users. This is then more of a damning 'moan'.

Most people will search for an answwr to their problem, and expect (maybe unrealistically) to drop on the exact answer they're looking for first time !

I usually start by searching the on-line help if I have a problem.
In the case in hand, search for 'Command Line' and you're presented with a myriad of POSSIBLY related links.

Maybe this appears appropriate:-
http://silverfrost.com/ftn95-help/options/compiler_options_command_line.aspx
but on looking, it's not exactly clear is it, especially as it jumps in immenìdiately with the /CLR option attached which is for .NET applications which , frankly, only a minotity of people use.

You could drop on this:-
http://silverfrost.com/ftn95-help/options/quick_reference.aspx
although it contains all (well most of) the command line options for compiling/linking it isn't maybe intuitive for new users.
One thing that is hidden in there is under /FREE_FORMAT which is the ONLY place (apart from on comments in forums) I've ever seen mention of F77 fixed format files needing to have .for extension and F95 files .f90 extension !!! Surely that should be in the main, simple opening paragraph of any documentation on running in Command Line mode ???
And someone please tell me why it's not a .f95 extension required ? ('because the differences between f90 and f95 are not very big' is not a valid answer imo)

then again you could drop on this:-
http://silverfrost.com/ftn95-help/devel/compiler_cmdline.aspx

or become befuddled by this:-
http://silverfrost.com/ftn95-help/slink/command_line_mode1.aspx
(lots of talk of colons for example, yet not a colon in sight in example !!! and what DOES that 'kite' symbol mean ? (also seen in other strange places)

Then there's the .pdf documentation, and the downloadable .chm (is that just the same as the online manual or are there differences ?, then of course the .enh file as sources for documentation of various things.

Personally I'd recommend to PrintTFM and RTFM off-line first before jumping into the on-line manual, but then I'm of the old school and have no quarms about saving the trees (if you think stopping printing stuff on paper is going to save the rain forest then you've not grasped the scale of that particular problem).

All in all these sources contain a cornucopia of information, which contains almost everything you need, but maybe not in an ordered obvious style.

As a minimum there should be a logical summary of the various documentations, and where best to look and in what order, which would help enormously new users (and old !) to find stuff and not put them off at the first hurdle.

Then there's Dan's suggestion of 'the modern way' of producing tutorial videos, which I agree would be good IF it was well done and concise.

I've seen one major company I've worked for in the past employ specifically a person to collate and organise all the documentation in the department and it was worth it's weight in gold once achieved.
Maybe Silverfrost should consider taking on a student or two on work experience to re-organise all the documentation ?

First impressions are the most important and in the case of FTN95 is an area which could be improved significantly I believe.

All Food for Thought.

... and for the 2nd time in 2 days I'll say again 'don't get me going on the inadequacies of searching in the forums. It drives me crazy.
Luckily I've passed the critical point where I have seen that the capabilities and potential of FTN95 make the documentation pains bearable, but how many don't and simply give up I wonder ?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group