{"id":2000,"date":"2014-02-24T20:16:28","date_gmt":"2014-02-24T20:16:28","guid":{"rendered":"http:\/\/blog.bachi.net\/?p=2000"},"modified":"2016-01-08T12:24:51","modified_gmt":"2016-01-08T12:24:51","slug":"fortran-95","status":"publish","type":"post","link":"https:\/\/blog.bachi.net\/?p=2000","title":{"rendered":"Fortran 95"},"content":{"rendered":"<p><a href=\"http:\/\/gcc.gnu.org\/wiki\/GFortran\">GFortran<\/a><br \/>\n<a href=\"http:\/\/gcc.gnu.org\/wiki\/GFortranGettingStarted\">GFortran Getting Started<\/a><br \/>\n<a href=\"http:\/\/gcc.gnu.org\/wiki\/GFortranUsage\">GFortran Usage<\/a><\/p>\n<p><a href=\"http:\/\/de.wikibooks.org\/wiki\/Fortran:_Fortran_95:_Unterprogramme\">Fortran: Fortran 95: Unterprogramme<\/a><br \/>\n<a href=\"http:\/\/de.wikibooks.org\/wiki\/Fortran:_Fortran_95:_Datentypen\">Fortran: Fortran 95: Datentypen<\/a><br \/>\n<a href=\"http:\/\/en.wikibooks.org\/wiki\/Fortran\/Fortran_examples\">Fortran\/Fortran examples<\/a> (en)<\/p>\n<p><a href=\"http:\/\/gcc.gnu.org\/onlinedocs\/gfortran\/RANDOM_005fNUMBER.html\">RANDOM_NUMBER \u2014 Pseudo-random number<\/a><br \/>\n<a href=\"http:\/\/gcc.gnu.org\/onlinedocs\/gfortran\/RAND.html\">RAND \u2014 Real pseudo-random number<\/a><\/p>\n<p><a href=\"http:\/\/stackoverflow.com\/questions\/10884260\/how-can-gfortran-tell-if-i-am-compiling-f90-or-f95-code\">How can gfortran tell if I am compiling f90 or f95 code?<\/a><\/p>\n<h3>FAQ<\/h3>\n<h4>Question<\/h4>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ make\r\n&#x5B;FC] src\/main.f90\r\nmake: gfortran-4.7: Command not found\r\nMakefile.inc:37: recipe for target 'obj\/main.o' failed\r\nmake: *** &#x5B;obj\/main.o] Error 127\r\n<\/pre>\n<h4>Answer<\/h4>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ sudo apt-get install gfortran\r\nReading package lists... Done\r\nBuilding dependency tree       \r\nReading state information... Done\r\nThe following extra packages will be installed:\r\n  gfortran-5 libgfortran-5-dev\r\nSuggested packages:\r\n  gfortran-multilib gfortran-doc gfortran-5-multilib gfortran-5-doc libgfortran3-dbg\r\nThe following NEW packages will be installed:\r\n  gfortran gfortran-5 libgfortran-5-dev\r\n&#x5B;...]\r\n\r\n$ vi Makefile\r\nChange gfortran-4.7 to gfortran\r\n\r\n$ make\r\n&#x5B;FC] src\/main.f90\r\n&#x5B;FC] src\/pi.f90\r\n&#x5B;LD] pi\r\n<\/pre>\n<h4>Question<\/h4>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ make\r\n&#x5B;MKDIR] obj\/hello\/.\/\r\n&#x5B;FC] src\/hello.f\r\n\r\n&#x5B;...]\r\n\r\nError: Non-numeric character in statement label at (1)\r\nsrc\/hello.f:15:3:\r\n\r\n   end \r\n   1\r\nError: Unclassifiable statement at (1)\r\nf951: Error: Unexpected end of file in \u2018src\/hello.f\u2019\r\nMakefile.inc:50: recipe for target 'obj\/hello\/hello.o' failed\r\nmake: *** &#x5B;obj\/hello\/hello.o] Error 1\r\n<\/pre>\n<h4>Answer<\/h4>\n<p><a href=\"https:\/\/gcc.gnu.org\/wiki\/GFortranGettingStarted\">Getting started with gfortran<\/a><br \/>\n<a href=\"https:\/\/gcc.gnu.org\/onlinedocs\/gfortran\/Fortran-Dialect-Options.html\">Options controlling Fortran dialect<\/a><\/p>\n<p>-ffree-form<br \/>\n-ffixed-form<br \/>\n    Specify the layout used by the source file. The free form layout was introduced in Fortran 90. Fixed form was traditionally used in older Fortran programs. When neither option is specified, the source form is determined by the file extension.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nhello_FFLAGS  = -ffree-form\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>GFortran GFortran Getting Started GFortran Usage Fortran: Fortran 95: Unterprogramme Fortran: Fortran 95: Datentypen Fortran\/Fortran examples (en) RANDOM_NUMBER \u2014 Pseudo-random number RAND \u2014 Real pseudo-random number How can gfortran tell if I am compiling f90 or f95 code? FAQ Question $ make &#x5B;FC] src\/main.f90 make: gfortran-4.7: Command not found Makefile.inc:37: recipe for target &#8216;obj\/main.o&#8217; failed [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2000","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/2000","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2000"}],"version-history":[{"count":6,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/2000\/revisions"}],"predecessor-version":[{"id":4523,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/2000\/revisions\/4523"}],"wp:attachment":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2000"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2000"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2000"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}