{"id":163,"date":"2017-09-13T10:41:35","date_gmt":"2017-09-13T13:41:35","guid":{"rendered":"http:\/\/www.professores.uff.br\/diomarcesarlobao\/?page_id=163"},"modified":"2017-09-13T10:41:35","modified_gmt":"2017-09-13T13:41:35","slug":"sifunc-f","status":"publish","type":"page","link":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/sifunc-f\/","title":{"rendered":"sifunc.f"},"content":{"rendered":"<pre>c&lt;html&gt;\r\nc&lt;body&gt;\r\nc&lt;pre&gt;\r\n      program sifunc\r\n      implicit none\r\n      real a,b,c,x,y,z,f1\r\n      data c \/ 5.\/\r\nc\r\nc    This is a statement function.  It is considered an executable\r\nc    statement, and commonly positioned at the beginning of executable\r\nc    statements.  It may actually exist anywhere in the executable\r\nc    portion of the program unit before it is put to use.\r\nc&lt;a name=\"sf\"&gt;&lt;font color=\"FF0000\"&gt;\r\n      f1(x,y)=a+b*x**2+c*y\r\nc&lt;\/font&gt;&lt;\/a&gt;\r\n      a = 1\r\n      b = 2\r\n      z = f1(2.,2.)\r\n      print *, 'f1(2.,2.) = ', z\r\n      z = f1( b,b)\r\n      print *, 'f1(b ,b ) = ', z\r\nc\r\n      z = f2(2.,2.)\r\n      print *, 'f2(2.,2.) = ', z\r\n      z = f2( b,b)\r\n      print *, 'f2(b ,b ) = ', z\r\nc\r\nc    The following CONTAINS statement marks the end of the main program unit\r\nc    and the beginning of a block of \"INTERNAL\" subprograms.  Here I'm\r\nc    just including one function.  Notice that it knows the values of\r\nc    a, b, and c set in the main program.  (You can put internal subprograms\r\nc    at the end of normal external subroutines, functions, and modules)\r\nc&lt;a name=\"1\"&gt;&lt;font color=\"FF0000\"&gt;\r\n      contains\r\nc&lt;\/a&gt;&lt;\/font&gt;\r\nc\r\n      function f2(x,y)\r\n      real x,y,f2\r\n      f2 = a + b*x**2 + c*y\r\n      return\r\n      end function f2\r\nc\r\nc    Don't forget the end statement for the main program\r\nc\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;body&gt; c&lt;pre&gt; program sifunc implicit none real a,b,c,x,y,z,f1 data c \/ 5.\/ c c This is a statement function. It is considered an executable c statement, and commonly positioned at the beginning of executable c statements. It may actually exist anywhere in the executable c portion of the program unit before it is put [&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-163","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/163","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=163"}],"version-history":[{"count":1,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/163\/revisions"}],"predecessor-version":[{"id":164,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/163\/revisions\/164"}],"wp:attachment":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/media?parent=163"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/categories?post=163"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/tags?post=163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}