# Fortran textbook

**URL:** https://fortran-lang.discourse.group/t/fortran-textbook/8860
**Category:** Tutorials
**Created:** [November 20, 2024, 7:10pm UTC](https://fortran-lang.discourse.group/t/fortran-textbook/8860 "2024-11-20T19:10:30Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![victotronics](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/victotronics/32/2962_2.png) [@victotronics](https://fortran-lang.discourse.group/u/victotronics)
#### Post date: [November 20, 2024, 7:10pm UTC](https://fortran-lang.discourse.group/t/fortran-textbook/8860/1 "2024-11-20T19:10:30Z")

</div>

I have an open source C++/Fortran textbook. See [https://theartofhpc.com/](https://theartofhpc.com/) and go to volume 3. Comments always welcome.

---

<div class="post-metadata">

### Author: ![Shahid](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/shahid/32/3672_2.png) [@Shahid](https://fortran-lang.discourse.group/u/Shahid)
#### Post date: [November 21, 2024, 6:28am UTC](https://fortran-lang.discourse.group/t/fortran-textbook/8860/2 "2024-11-21T06:28:40Z")

</div>

The books are nicely formatted with beautiful color schemes. However, reading [https://github.com/VictorEijkhout/TheArtofHPC\_pdfs/blob/main/vol3/EijkhoutIntroSciProgramming-book.pdf](https://github.com/VictorEijkhout/TheArtofHPC_pdfs/blob/main/vol3/EijkhoutIntroSciProgramming-book.pdf) I see some confusions.

1. The book is about Fortran 2008 but it does not mention 2008 standards but 2003. For instance

**Remark 32** In Fortran77, 19 continuation lines were allowed. In Fortran95 this number was 40. As of the Fortran2003 standard, a line can be continued 256 times.

**Remark 33** In Fortran66 there was a limit of six characters to the length of a variable name, though many compilers had extensions to this. As of the Fortran2003 standard, a variable name can be 63 characters long.

---

<div class="post-metadata">

### Author: ![Euler-37](https://avatars.discourse-cdn.com/v4/letter/e/b19c9b/32.png) [@Euler-37](https://fortran-lang.discourse.group/u/Euler-37)
#### Post date: [November 22, 2024, 9:53am UTC](https://fortran-lang.discourse.group/t/fortran-textbook/8860/3 "2024-11-22T09:53:19Z")

</div>

Page.413

 ![FIG](https://global.discourse-cdn.com/free1/uploads/fortran_lang/original/2X/d/df8dacd8efb97ed533587d631b8b90eb1bb874c6.png)

```fortran

program main
   implicit none
   integer,parameter::n=5
   real(8),dimension(2:N+1) :: Afrom1 = & !Aform2 -> Aform1
             [1,2,3,4,5] 
   integer::lo,hi,i
   lo = lbound(Afrom1,1)
   hi = ubound(Afrom1,1)
   print *,lo,hi
   print '(i3,":",f5.3)', &
           (i,Afrom1(i),i=lo,hi)
end program main

```

the result should be

```auto
            2 6
  2:1.000
  3:2.000
  4:3.000
  5:4.000
  6:5.000

```
