replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - FTN95 options
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: 506
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: 2923
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: 2615
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: 2923
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: 2923
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: 1899

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: 2615
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: 1899

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: 2402
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
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