{"id":2929769,"date":"2011-10-09T02:33:07","date_gmt":"2011-10-09T12:33:07","guid":{"rendered":"https:\/\/math.hawaii.edu\/wordpress\/?p=2929769"},"modified":"2013-10-18T01:44:37","modified_gmt":"2013-10-18T11:44:37","slug":"fortran-6","status":"publish","type":"post","link":"https:\/\/math.hawaii.edu\/wordpress\/fortran-6\/","title":{"rendered":"Fortran: Lesson 6"},"content":{"rendered":"\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<h4>\n\t\t\t\t\t\t\t\t\tLesson topics\n\t\t\t\t\t\t\t\t<\/h4>\n\t\t\t\t\t\t\t\t<div style=\"width:290px;float:left;\">\n\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/math.hawaii.edu\/wordpress\/fortran-6\/#initial\">Initializing Variables<\/a><br \/>\n\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/math.hawaii.edu\/wordpress\/fortran-6\/#mod\">Mod<\/a><br \/>\n\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/math.hawaii.edu\/wordpress\/fortran-6\/#sub\">Subroutines<\/a><br \/>\n\t\t\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t\t<div style=\"width:290px;float:left;\">\n\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/math.hawaii.edu\/wordpress\/fortran-6\/#call\">Call Statement<\/a><br \/>\n\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/math.hawaii.edu\/wordpress\/fortran-6\/#return\">Return in Subroutines<\/a><br \/>\n\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/math.hawaii.edu\/wordpress\/fortran-6\/#varsub\">Variable Substitution<\/a><br \/>\n\t\t\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t\t<div class=\"clearer\"><\/div>\n\t\t\t\t\t\t\t\t<br \/>\n\n\t\t\t\t\t\t\t\t<div style=\"width:290px;float:left;\">\n\t\t\t\t\t\t\t\t\t<h5>\n\t\t\t\t\t\t\t\t\t\tView Demos\n\t\t\t\t\t\t\t\t\t<\/h5>\n\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/math.hawaii.edu\/wordpress\/fortran-6\/?demo=1\"># 1<\/a>\n\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/math.hawaii.edu\/wordpress\/fortran-6\/?demo=2\"># 2<\/a>\n\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/math.hawaii.edu\/wordpress\/fortran-6\/?demo=3\"># 3<\/a>\n\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/math.hawaii.edu\/wordpress\/fortran-6\/?demo=4\"># 4<\/a><br \/>\n\t\t\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t\t<div style=\"width:290px;float:left;\">\n\t\t\t\t\t\t\t\t\t<h5>\n\t\t\t\t\t\t\t\t\t\tDownload Demos\n\t\t\t\t\t\t\t\t\t<\/h5>\n\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/math.hawaii.edu\/lab\/197\/fortran\/demo6-1.f\"># 1<\/a>\n\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/math.hawaii.edu\/lab\/197\/fortran\/demo6-2.f\"># 2<\/a>\n\t\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/math.hawaii.edu\/lab\/197\/fortran\/demo6-3.f\"># 3<\/a>\n\t\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/math.hawaii.edu\/lab\/197\/fortran\/demo6-4.f\"># 4<\/a><br \/>\n\t\t\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t\t<div class=\"clearer\"><\/div>\n\t\t\t\t\t\t\t\t<br \/>\n\t\t\t\t\t\t\t\t\n\n\n\t\t\t\t\t\t\t\t<h3><a id=\"initial\"><\/a>Initializing Variables<\/h3>\n\n\t\t\t\t\t\t\t\tRecall that in Basic the default value of a numeric variable is always zero - that is, if you introduce a numeric variable but do not specify its value, Basic automatically gives it the value zero. In GNU Fortran the situation is more confused. A real variable with no value specified will be given a value - but usually a very small value that is not precisely zero, and sometimes a value that is not even close to zero. An integer is given the default value 1. This strange behavior is hardly ever a problem, as usually when the variable is eventually used in the program it is given an appropriate value by some assignment statement. But trouble might arise if a forgetful programmer proceeds on the assumption that the default value is zero, or perhaps neglects to include an assignment statement. If you are worried about the problem, you can assign values to all your variables at the beginning of your program - a procedure called \"initializing variables\". The easiest way to do this is with ordinary assignment statements, such as \"x = 0\", or \"y = 2.61\", etc. (For programs with a large number of variables a more efficient method is to use DATA statements; we will discuss these later.)<br \/>\n\n\t\t\t\t\t\t\t\t<h3><a id=\"mod\"><\/a>Mod<\/h3>\n\n\t\t\t\t\t\t\t\tIn Fortran the expression <i>mod(n,m)<\/i> gives the remainder when n is divided by m; it is meant to be applied mainly to integers. Examples are<br \/>\n\t\t\t\t\t\t\t\t<blockquote>mod(8,3) = 2 &#160; , &#160; mod(27,4) = 3 &#160; , &#160; mod(11,2) = 1 &#160; , &#160; mod(20,5) = 0 &#160;.<\/blockquote><br \/>\n\n\t\t\t\t\t\t\t\t<h3><a id=\"sub\"><\/a>Subroutines<\/h3>\n\n\t\t\t\t\t\t\t\tA <i>subroutine<\/i> in Fortran works like a subprogram in Basic, except that you do not declare a subroutine. Subroutines are typed in the source file after the main program. A subroutine must have a name, followed by a list of variables in parentheses. A variable may be of any type, including a character variable, and can be an array. A subroutine begins with variable declaration statements, just as the main program.<br \/>\n\t\t\t\t\t\t\t\t<a id=\"call\"><\/a>The main program uses a <i>call<\/i> statement to call the subroutine. The call statement has also a list of variables, which are substituted for the subroutine variables. The subroutine executes, modifying some or all of its variables, which are then substituted back for the original call variables in the main program. The variables in the call statement must match the variables in the subroutine according to number, type, and dimension. (Oversights lead to type-mismatch error messages by the compiler.)<br \/>\n\t\t\t\t\t\t\t\tHere is a simple program named <i>average<\/i> that prompts the user for two real numbers, calls a subroutine named <i>avg<\/i> to average the numbers, and then prints the average.\n\t\t\t\t\t\t\t\t<!--\n\t\t\t\t\t\t\t\t<br \/>\n\t\t\t\t\t\t\t\t<table class=\"data_table\">\n\t\t\t\t\t\t\t\t<tr><td>program average<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td>real x, y, z<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td>print *, \"What are the two numbers you want to average?\"<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td>read *, x, y<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td>call avg(x,y,z)<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td>print *, \"The average is\", z<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td>end<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td>&#160;<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td>subroutine avg(a,b,c)<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td>real a, b, c<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td>c = (a + b)\/2.<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td>end<\/td><\/tr>\n\t\t\t\t\t\t\t\t<\/table><br \/>\n\t\t\t\t\t\t\t\t-->\n\t\t\t\t\t\t\t\t<pre class=\"brush:fortran;\">\n\t\t\t\t\t\t\t\tprogram average\n\t\t\t\t\t\t\t\treal x, y, z\n\t\t\t\t\t\t\t\tprint *, \"What are the two numbers you want to average?\"\n\t\t\t\t\t\t\t\tread *, x, y\n\t\t\t\t\t\t\t\tcall avg(x,y,z)\n\t\t\t\t\t\t\t\tprint *, \"The average is\", z\n\t\t\t\t\t\t\t\tend\n \n\t\t\t\t\t\t\t\tsubroutine avg(a,b,c)\n\t\t\t\t\t\t\t\treal a, b, c\n\t\t\t\t\t\t\t\tc = (a + b)\/2.\n\t\t\t\t\t\t\t\tend<\/pre>\n\n\n\t\t\t\t\t\t\t\tWhen the subroutine is called it substitutes x for a, y for b, and z for c. (Although the user does not input z, GNU Fortran will have given it some default value.) After the subroutine does its calculations, the new values of a, b, c are substituted back into the main program for x, y, z. (In this particular subroutine only c changes, so x and y retain their original values.) After the subroutine completes its run, action is returned to the statement in the main program immediately following the call statement.<br \/>\n\t\t\t\t\t\t\t\tJust remember that, except for the first statement naming the subroutine and listing the variables, a subroutine has the same general structure as a main program. It begins with type and dimension statements, has a main body carrying out the action, and concludes with an <i>end<\/i> statement.<br \/>\n\t\t\t\t\t\t\t\tThe advantage of using subroutines is that the main program can be kept relatively simple and easy to follow, while nitty-gritty calculations and complex procedures are shuffled off to various subroutines, each performing a specific task. A well-written subroutine can be saved in a subroutine \"library\", to be inserted into other main programs as the need arises.<br \/>\n\t\t\t\t\t\t\t\tA subroutine can call another subroutine, and it can also access a function subprogram.<br \/>\n\t\t\t\t\t\t\t\tA subroutine need not depend on any variables - in which case no parentheses follow the subroutine name. Here is a simple subroutine involving no variables:<br \/>\n\t\t\t\t\t\t\t\t<pre class=\"brush:fortran;\">\n\t\t\t\t\t\t\t\t\tsubroutine bluesky\n\t\t\t\t\t\t\t\t\tprint *, \"The sky is blue.\"\n\t\t\t\t\t\t\t\t\tend<\/pre>\n\t\t\t\t\t\t\t\t<!--\n\t\t\t\t\t\t\t\t<table class=\"data_table\">\n\t\t\t\t\t\t\t\t<tr><td>subroutine bluesky<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td>print *, \"The sky is blue.\"<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td>end<\/td><\/tr>\n\t\t\t\t\t\t\t\t<\/table><br \/>\n\t\t\t\t\t\t\t\t-->\n\t\t\t\t\t\t\t\tThe call statement for this subroutine,\n\t\t\t\t\t\t\t\t<pre class=\"brush:fortran;gutter:false;\">\n\t\t\t\t\t\t\t\t\tcall bluesky<\/pre>\n\n\t\t\t\t\t\t\t\tlikewise lists no variables.<br \/>\n\t\t\t\t\t\t\t\tThe following subroutine computes the product of a 2 x 2 matrix A with a 2 x 1 vector x, according to the formula<br \/>\n\t\t\t\t\t\t\t\t<!-- MathJax: \n\t\t\t\t\t\t\t\t$$\n\t\t\t\t\t\t\t\t  \\left[\\begin{array}{rrr|r}\n\t\t\t\t\t\t\t\t    1 &amp; 2 &amp; 4 &amp; 8 \\\\\n\t\t\t\t\t\t\t\t    16 &amp; 32 &amp; 64 &amp; 128 \\\\\n\t\t\t\t\t\t\t\t    256 &amp; 512 &amp; 1024 &amp; 2048\n\t\t\t\t\t\t\t\t  \\end{array}\\right]\n\t\t\t\t\t\t\t\t$$\n\t\t\t\t\t\t\t\t-->\n\t\t\t\t\t\t\t\t<table class=\"data_table\">\n\t\t\t\t\t\t\t\t<tr><td><img decoding=\"async\" alt=\"matmult\" src=\"http:\/\/math.hawaii.edu\/lab\/197\/fortran\/matmult.gif\" \/><\/td><\/tr>\n\t\t\t\t\t\t\t\t<\/table><br \/>\n\t\t\t\t\t\t\t\tIt accepts as variables a 2 x 2 array A and one-dimensional arrays x and y, each indexed from 1 to 2. The array y represents the product y = Ax.\n\t\t\t\t\t\t\t\t<!--\n\t\t\t\t\t\t\t\t<br \/>\n\t\t\t\t\t\t\t\t<table class=\"data_table\">\n\t\t\t\t\t\t\t\t<tr><td>subroutine prod(A,x,y)<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td>real A(2,2), x(2), y(2)<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td>y(1) = A(1,1) * x(1) + A(1,2) * x(2)<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td>y(2) = A(2,1) * x(1) + A(2,2) * x(2)<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td>end<\/td><\/tr>\n\t\t\t\t\t\t\t\t<\/table><br \/>\n\t\t\t\t\t\t\t\t-->\n\t\t\t\t\t\t\t\t<pre class=\"brush:fortran;\">\n\t\t\t\t\t\t\t\t\tsubroutine prod(A,x,y)\n\t\t\t\t\t\t\t\t\treal A(2,2), x(2), y(2)\n\t\t\t\t\t\t\t\t\ty(1) = A(1,1) * x(1) + A(1,2) * x(2)\n\t\t\t\t\t\t\t\t\ty(2) = A(2,1) * x(1) + A(2,2) * x(2)\n\t\t\t\t\t\t\t\t\tend<\/pre>\n\t\t\t\t\t\t\t\tA call statement for this subroutine might be something like\n\t\t\t\t\t\t\t\t<pre class=\"brush:fortran;gutter:false;\">\n\t\t\t\t\t\t\t\t\tcall prod(B,u,v)<\/pre>\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\twhere B and u are arrays known to the main program and the product v is to be computed by the subroutine. Of course the main program will have appropriately dimensioned these arrays. After the subroutine completes its task and returns control to the main program, the array v will represent the product Bu.\n\t\t\t\t\t\t\t\t<\/p>\n\n\t\t\t\t\t\t\t\t<h3><a id=\"return\"><\/a>Return (in Subroutines)<\/h3>\n\n\t\t\t\t\t\t\t\tA <i>return<\/i> statement in a subroutine instructs Fortran to terminate the subroutine and return to the main program at the point where it departed. Thus it works like a <i>stop<\/i> statement in the main program, halting the program prematurely before the final <i>end<\/i> statement. A subroutine may have several returns, but only one end statement.<br \/>\n\t\t\t\t\t\t\t\tHere is a subroutine, using a return statement, that decides whether a positive integer n is a prime number:\n\t\t\t\t\t\t\t\t<!--\n\t\t\t\t\t\t\t\t<br \/>\n\t\t\t\t\t\t\t\t<table class=\"data_table\">\n\t\t\t\t\t\t\t\t<tr><td colspan=\"3\">subroutine check(n,result)<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td colspan=\"3\">integer n, i, root<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td colspan=\"3\">character result*9<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td colspan=\"3\">if (n .eq. 1) then<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td><\/td><td width=\"30\"><\/td><td>result = \"not prime\"<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td><\/td><td width=\"30\"><\/td><td>return<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td colspan=\"3\">end if<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td colspan=\"3\">root = sqrt(real(n))<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td colspan=\"3\">do i = 2, root<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td width=\"30\"><\/td><td colspan=\"2\">if (mod(n,i) .eq. 0) then<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td><\/td><td width=\"30\"><\/td><td>result = \"not prime\"<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td><\/td><td width=\"30\"><\/td><td>return<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td width=\"30\"><\/td><td colspan=\"2\">end if<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td colspan=\"3\">end do<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td colspan=\"3\">result = \"prime\"<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td colspan=\"3\">end<\/td><\/tr>\n\t\t\t\t\t\t\t\t<\/table><br \/>\n\t\t\t\t\t\t\t\t-->\n\t\t\t\t\t\t\t\t<pre class=\"brush:fortran;\">\n\t\t\t\t\t\t\t\t\tsubroutine check(n,result)\n\t\t\t\t\t\t\t\t\tinteger n, i, root\n\t\t\t\t\t\t\t\t\tcharacter result*9\n\t\t\t\t\t\t\t\t\tif (n .eq. 1) then\n\t\t\t\t\t\t\t\t\t\tresult = \"not prime\"\n\t\t\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t\t\tend if\n\t\t\t\t\t\t\t\t\troot = sqrt(real(n))\n\t\t\t\t\t\t\t\t\tdo i = 2, root\n\t\t\t\t\t\t\t\t\t\tif (mod(n,i) .eq. 0) then\n\t\t\t\t\t\t\t\t\t\t\tresult = \"not prime\"\n\t\t\t\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t\t\t\tend if\n\t\t\t\t\t\t\t\t\tend do\n\t\t\t\t\t\t\t\t\tresult = \"prime\"\n\t\t\t\t\t\t\t\t\tend<\/pre>\n\t\t\t\t\t\t\t\tThe subroutine begins by checking whether n = 1, and if true it sets result = \"not prime\" and returns to the main program. If n > 1 the DO LOOP looks at integers from 2 up to the square root of n, checking whether each is a divisor of n. If and when it finds such a divisor, it sets result  = \"not prime\" and returns to the main program. But if no divisor of n is found, the subroutine completes the entire loop and sets result = \"prime\". After the subroutine ends, the main program need only look at the value of result to find out whether n is prime or not prime.<br \/>\n\n\t\t\t\t\t\t\t\t<h3><a id=\"varsub\"><\/a>Variable Substitution in Subprograms<\/h3>\n\n\t\t\t\t\t\t\t\tWe look in more detail at how variables are substituted for one another in the calling and execution of a subroutine or function subprogram. Let us suppose for example that a certain subroutine named \"demo\" depends on three variables, say a, b, and c, so that the first line of the subroutine is\n\t\t\t\t\t\t\t\t<pre class=\"brush:fortran;gutter:false;\">\n\t\t\t\t\t\t\t\t\tsubroutine demo(a,b,c)<\/pre>\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\tLet us assume also that the main program's call statement for this subroutine is<\/p>\n\t\t\t\t\t\t\t\t<pre class=\"brush:fortran;gutter:false;\">\n\t\t\t\t\t\t\t\t\tcall demo(x,y,z)<\/pre>\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\twhere x, y, and z are variables from the main program. The types and dimensions of x, y, and z will have been declared in the main program, and these must match the types and dimensions of a, b, and c, respectively, as declared in the subroutine.\n\t\t\t\t\t\t\t\t<\/p>\n\t\t\t\t\t\t\t\tThe values of x, y, and z will have been stored by Fortran in certain memory locations, designated in the diagram below as triangles:\n\t\t\t\t\t\t\t\t<br \/>\n\t\t\t\t\t\t\t\t<table class=\"data_table\">\n\t\t\t\t\t\t\t\t<tr><td>x &#8594; &#916;<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td>y &#8594; &#916;<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td>z &#8594; &#916;<\/td><\/tr>\n\t\t\t\t\t\t\t\t<\/table><br \/>\n\t\t\t\t\t\t\t\tWhen the subroutine \"demo\" is called, Fortran assigns the variable a the same memory location as x, b the same location as y, and c the same as z:<br \/>\n\t\t\t\t\t\t\t\t<table class=\"data_table\">\n\t\t\t\t\t\t\t\t<tr><td>x &#8594; &#916; &#8592; a<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td>y &#8594; &#916; &#8592; b<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td>z &#8594; &#916; &#8592; c<\/td><\/tr>\n\t\t\t\t\t\t\t\t<\/table><br \/>\n\t\t\t\t\t\t\t\t(This explains why the types and dimensions must match!) Now, as the subroutine \"demo\" runs, the variables a, b and c might change to new values. But since x, y, and z share memory locations with a, b, and c, the values of x, y, and z of course will have to change simultaneously along with a, b, and c. When the subroutine terminates and returns control to the main program, a, b, and c then are no longer active variables, but x, y, and z retain the final values of a, b, and c at the conclusion of the subroutine.<br \/>\n\t\t\t\t\t\t\t\tThere is a way to fool Fortran into not changing the value of a calling variable when the subroutine runs. In the above example, suppose we change the call statement to<br \/>\n\t\t\t\t\t\t\t\t<blockquote>call demo(x,(y),z) &#160;&#160;&#160;.<\/blockquote><br \/>\n\t\t\t\t\t\t\t\tWhen the variable y is enclosed in parentheses, Fortran treats (y) as a new expression and assigns it a different memory location than that of y, but with the save value as y. The last diagram changes to<br \/>\n\t\t\t\t\t\t\t\t<table class=\"data_table\">\n\t\t\t\t\t\t\t\t<tr><td>x &#8594; &#916; &#8592; a<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td>y &#8594; &#916;<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td>(y) &#8594; &#916; &#8592; b<\/td><\/tr>\n\t\t\t\t\t\t\t\t<tr><td>z &#8594; &#916; &#8592; c<\/td><\/tr>\n\t\t\t\t\t\t\t\t<\/table><br \/>\n\t\t\t\t\t\t\t\tNow, as b changes values during the execution of the subroutine, y is unaffected, so that at the conclusion of the subroutine y has its original value.\n\t\t\t\t\t\t\t\t<br \/>\n\t\t\t\t\t\t\t\tThe above analysis applies to function subprograms as well as to subroutines. Changes in the function variables during execution of a function subprogram induce corresponding changes in the variables used to call the function subprogram.\n\t\t\t\t\t\t\t\t\n\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[68],"tags":[],"class_list":["post-2929769","post","type-post","status-publish","format-standard","hentry","category-fortran-lessons"],"_links":{"self":[{"href":"https:\/\/math.hawaii.edu\/wordpress\/wp-json\/wp\/v2\/posts\/2929769","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/math.hawaii.edu\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/math.hawaii.edu\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/math.hawaii.edu\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/math.hawaii.edu\/wordpress\/wp-json\/wp\/v2\/comments?post=2929769"}],"version-history":[{"count":5,"href":"https:\/\/math.hawaii.edu\/wordpress\/wp-json\/wp\/v2\/posts\/2929769\/revisions"}],"predecessor-version":[{"id":2976479,"href":"https:\/\/math.hawaii.edu\/wordpress\/wp-json\/wp\/v2\/posts\/2929769\/revisions\/2976479"}],"wp:attachment":[{"href":"https:\/\/math.hawaii.edu\/wordpress\/wp-json\/wp\/v2\/media?parent=2929769"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/math.hawaii.edu\/wordpress\/wp-json\/wp\/v2\/categories?post=2929769"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/math.hawaii.edu\/wordpress\/wp-json\/wp\/v2\/tags?post=2929769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}