Code Comments
Programming Forum and web based access to our favorite programming groups.Hi all, I have just started learning FORTRAN and these are the basic questions I searched in the net for which I could not find any answers. Hope I get answers here. 1)Why FORTRAN is considered as the language suitable for computations? In my opinion all the languages can be used for computations(I am sure I am wrong )? 2) what is the difference between the following array declarations? LOGICAL*1 NAME(LENGTH) LOGICAL VALUE*1(MAXLEN) 3)Can I change the parameters of the function? If changed will the change the actual parameters that are passed while calling also gets changed? 4)What is the difference between the FORMAT codes F,G and E?All I know is that they are used for real data's. Thanks,
Post Follow-up to this messageprashna wrote: >1)Why FORTRAN is considered as the language suitable for computations? >In my opinion all the languages can be used for computations(I am sure >I am wrong )? Fortran was designed for FORmula TRANslation and has been used for that since the late 1950s. There are compilers that produce efficient code for all major computing platforms. The are free, fast, well-tested libraries such as LAPACK at Netlib http://www.netlib.org and comprehensive commercial libraries such as IMSL http://www.vni.com and NAG http://www.nag.com . Complex numbers are one of basic types, and the handling of arrays is good, especially since the 1990 standard. Math functions like SIN and EXP are defined for single and double precision real variables, complex variables, and often quadruple precision reals. The language is simple enough that non-professional programmers can quickly learn it. Other languages are used for computational work. It's partly a matter of taste. 2) what is the difference between the following array declarations? LOGICAL*1 NAME(LENGTH) LOGICAL VALUE*1(MAXLEN) >3)Can I change the parameters of the function? If changed will the >change the actual parameters that are passed while calling also gets >changed? Yes and yes, but I recommend using a subroutine in this case. I recommend that you learn Fortran 95, the latest version of Fortran for which compilers are available. You can start with the free compiler called g95 at http://www.g95.org . Fortran 95 compilers will in general compile Fortran 77 code as well as Fortran 95 code. A good description of various versions of Fortran is at http://www.kcl.ac.uk/kis/support/ci...90home.html#1.0 . A compiler for a Fortran 95 subset called F, designed for students but also usable for serious work, is free at http://www.fortran.com/F/index.html . It will not compile Fortran 77 code, but it can link to it. Fortran tutorials are at http://www.dmoz.org/Computers/Progr...tran/Tutorials/ .
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.