{"id":91,"date":"2017-09-13T10:00:05","date_gmt":"2017-09-13T13:00:05","guid":{"rendered":"http:\/\/www.professores.uff.br\/diomarcesarlobao\/?page_id=91"},"modified":"2017-09-13T10:00:05","modified_gmt":"2017-09-13T13:00:05","slug":"dimtest-f","status":"publish","type":"page","link":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/dimtest-f\/","title":{"rendered":"dimtest.f"},"content":{"rendered":"<pre>c&lt;html&gt;\r\nc&lt;head&gt;&lt;title&gt;dimtest.f&lt;\/title&gt;&lt;\/head&gt;\r\nc&lt;body&gt;\r\nc&lt;pre&gt;\r\n\r\n      program dimtest\r\nc\r\nc     test the DIM optional argument for Fortran 90\r\nc     intrinsic function  sum, minval, maxval\r\nc\r\nc      John Mahaffy 3\/31\/96\r\nc\r\n       real a(4,3), asum1(3), asum2(4), amx1(3), amx2(4),\r\n     $      amn1(3), amn2(4), cshft1(4,3), cshft2(4,3)\r\n       integer ish1(3), ish2(4)\r\nc &lt;a name=\"data\"&gt;&lt;font color=\"FF0000\"&gt;\r\n      data a\/1,2,3,4,1,2,3,4,5,6,7,8\/, ish1\/3*-2\/,\r\nc &lt;\/font&gt;&lt;\/a&gt;\r\n     $ ish2\/4*-1\/\r\nc    &lt;a name=2&gt;&lt;font color=113244&gt;\r\n      asum1 = sum(a, dim=1)\r\n      asum2 = sum (a, dim=2)\r\nc     &lt;\/font&gt;\r\nc     &lt;a name=3&gt;&lt;font color=FF0000&gt;\r\n      amx1 = maxval(a, dim=1)\r\n      amx2 = maxval( a, dim=2)\r\nc     &lt;\/font&gt;\r\nc     &lt;a name=4&gt;&lt;font color=991100&gt;\r\n      amn1 = minval ( a, dim=1)\r\n      amn2 = minval( a, dim=2)\r\nc     &lt;\/font&gt;\r\nc     &lt;a name=5&gt;&lt;font color=773399&gt;\r\n      cshft1 = cshift(a,shift=ish1,dim=1)\r\n      cshft2 = cshift(a,shift=ish2, dim=2)\r\nc     &lt;\/font&gt;\r\n      write(*,*) ' a = '\r\n      do i=1,4\r\n         write( *, 2000) (a(i,j),j=1,3)\r\n      enddo\r\n      write(*,\"(\/, 'Sum along the first dimension = ')\")\r\n      write(*,2000) asum1\r\n      write(*,\"(\/, 'Sum along the second dimension = ')\")\r\n      write(*,2000) asum2\r\n      write(*,\"(\/, 'Maximum along the first dimension = ')\")\r\n      write(*,2000) amx1\r\n      write(*,\"(\/, 'Maximum along the second dimension = ')\")\r\n      write(*,2000) amx2\r\n      write(*,\"(\/, 'Minimum along the first dimension = ')\")\r\n      write(*,2000) amn1\r\n      write(*,\"(\/, 'Minimum along the second dimension = ')\")\r\n      write(*,2000) amn2\r\n      write(*,\"(\/, 'Circular Shift up 2 along the 1st dimension = ')\")\r\n      write(*,2000) cshft1\r\n      write(*,\"(\/, 'Circular shift up 1 along the 2nd dimension = ')\")\r\n      write(*,2000) cshft2\r\n 2000 format(4x,4f8.1)\r\n      stop\r\n      end\r\nc&lt;\/pre&gt;\r\nc&lt;\/body&gt;\r\nc&lt;\/html&gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>c&lt;html&gt; c&lt;head&gt;&lt;title&gt;dimtest.f&lt;\/title&gt;&lt;\/head&gt; c&lt;body&gt; c&lt;pre&gt; program dimtest c c test the DIM optional argument for Fortran 90 c intrinsic function sum, minval, maxval c c John Mahaffy 3\/31\/96 c real a(4,3), asum1(3), asum2(4), amx1(3), amx2(4), $ amn1(3), amn2(4), cshft1(4,3), cshft2(4,3) integer ish1(3), ish2(4) c &lt;a name=&#8221;data&#8221;&gt;&lt;font color=&#8221;FF0000&#8243;&gt; data a\/1,2,3,4,1,2,3,4,5,6,7,8\/, ish1\/3*-2\/, c &lt;\/font&gt;&lt;\/a&gt; $ ish2\/4*-1\/ c &lt;a [&hellip;]<\/p>\n","protected":false},"author":22,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[],"tags":[],"class_list":["post-91","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/91","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/comments?post=91"}],"version-history":[{"count":1,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/91\/revisions"}],"predecessor-version":[{"id":92,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/91\/revisions\/92"}],"wp:attachment":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/media?parent=91"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/categories?post=91"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/tags?post=91"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}