Skip to content

Commit caeb853

Browse files
committed
language_elements.md: remove a level of hierachy
Given this is chapter is a file on its own, one level of `#` is removed. Signed-off-by: Norwid Behrnd <[email protected]>
1 parent b2f5709 commit caeb853

File tree

1 file changed

+19
-20
lines changed

1 file changed

+19
-20
lines changed

source/learn/f95_features/language_elements.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
## Language elements
1+
# Language elements
32

43
Fortran is <a href="case-insensitive" class="wikilink"
54
title="case-insensitive">case-insensitive</a>. The convention of writing
@@ -11,7 +10,7 @@ transfer</a> and
1110
<a href="#Operations_on_external_files" class="wikilink"
1211
title="Operations on external files">Operations on external files</a>).
1312

14-
### Basics
13+
## Basics
1514

1615
The basic component of the Fortran language is its *character set*. Its
1716
members are
@@ -64,7 +63,7 @@ lines:
6463

6564
a leading `&` on the continued line is also required.
6665

67-
### Intrinsic data types
66+
## Intrinsic data types
6867

6968
Fortran has five *intrinsic data types*: `INTEGER`, `REAL`, `COMPLEX`,
7069
`LOGICAL` and `CHARACTER`. Each of those types can be additionally
@@ -81,9 +80,9 @@ corresponding form of *literal constant*. The numeric types `INTEGER`
8180
and `REAL` can only be signed (there is no concept of sign for type
8281
`COMPLEX`).
8382

84-
#### Literal constants and kinds
83+
### Literal constants and kinds
8584

86-
##### INTEGER
85+
#### INTEGER
8786

8887
Integer literal constants of the default kind take the form
8988

@@ -137,7 +136,7 @@ constants"):
137136
B'01010101' O'01234567' Z'10fa'
138137
```
139138

140-
##### REAL
139+
#### REAL
141140

142141
There are at least two real kindsthe default and one with greater
143142
precision (this replaces
@@ -175,15 +174,15 @@ KIND(1.7_long) PRECISION(1.7_long) RANGE(1.7_long)
175174
that give in turn the kind type value, the actual precision (here at
176175
least 9), and the actual range (here at least 99).
177176

178-
##### COMPLEX
177+
#### COMPLEX
179178

180179
`COMPLEX` data type is built of two integer or real components:
181180

182181
```f90
183182
(1, 3.7_long)
184183
```
185184

186-
##### LOGICAL
185+
#### LOGICAL
187186

188187
There are only two basic values of logical constants: `.TRUE.` and
189188
`.FALSE.`. Here, there may also be different kinds. Logicals don't have
@@ -200,7 +199,7 @@ and the `KIND` function operates as expected:
200199
KIND(.TRUE.)
201200
```
202201

203-
##### CHARACTER
202+
#### CHARACTER
204203

205204
The forms of literal constants for `CHARACTER` data type are
206205

@@ -219,7 +218,7 @@ the `KIND` function:
219218
KIND('ASCII')
220219
```
221220

222-
#### Number model and intrinsic functions
221+
### Number model and intrinsic functions
223222

224223
The numeric types are based on number models with associated inquiry
225224
functions (whose values are independent of the values of their
@@ -238,7 +237,7 @@ important for portable numerical software:
238237
| `RANGE(X)` | Decimal exponent range |
239238
| `TINY(X)` | Smallest positive number (real) |
240239

241-
### Scalar variables
240+
## Scalar variables
242241

243242
Scalar <a href="Variable_(programming)" class="wikilink"
244243
title="variables">variables</a> corresponding to the five intrinsic
@@ -306,7 +305,7 @@ Finally, there is a set of intrinsic character functions, examples being
306305
| `REPEAT` | `SCAN`(for one of a set) |
307306
| `TRIM` | `VERIFY`(for all of a set) |
308307

309-
### Derived data types
308+
## Derived data types
310309

311310
For derived data types, the form of the type must be defined first:
312311

@@ -369,7 +368,7 @@ t%a%x t%a%y t%b%x etc.
369368
(Note that the `%` qualifier was chosen rather than dot (`.`) because of
370369
potential ambiguity with operator notation, like `.OR.`).
371370

372-
### Implicit and explicit typing
371+
## Implicit and explicit typing
373372

374373
Unless specified otherwise, all variables starting with letters I, J, K,
375374
L, M and N are default `INTEGER`s, and all others are default `REAL`;
@@ -392,7 +391,7 @@ IMPLICIT NONE
392391

393392
at the beginning of each program unit.
394393

395-
### Arrays
394+
## Arrays
396395

397396
Arrays are considered to be variables in their own right. Every array is
398397
characterized by its
@@ -467,7 +466,7 @@ so that
467466
468467
is an array component of a scalar
469468
470-
### Data initialization
469+
## Data initialization
471470
472471
Variables can be given initial values as specified in a specification
473472
statement:
@@ -503,7 +502,7 @@ causes local variables to retain their value after a procedure call and
503502
then to initialize the variable to the saved value upon returning to the
504503
procedure.
505504

506-
#### PARAMETER attribute
505+
### PARAMETER attribute
507506

508507
A named constant can be specified directly by adding the `PARAMETER`
509508
attribute and the constant values to a type statement:
@@ -513,7 +512,7 @@ REAL, DIMENSION(3), PARAMETER :: field = (/ 0., 1., 2. /)
513512
TYPE(triplet), PARAMETER :: t = triplet( (/ 0., 0., 0. /) )
514513
```
515514

516-
#### DATA statement
515+
### DATA statement
517516

518517
The `DATA` statement can be used for scalars and also for arrays and
519518
variables of derived type. It is also the only way to initialise just
@@ -527,7 +526,7 @@ DATA array(1:64) / 64*0/
527526
DATA i, j, k/ B'01010101', O'77', Z'ff'/
528527
```
529528

530-
#### Initialization expressions
529+
### Initialization expressions
531530

532531
The values used in `DATA` and `PARAMETER` statements, or with these
533532
attributes, are constant expressions that may include references to:
@@ -542,7 +541,7 @@ INTEGER, PARAMETER :: long = SELECTED_REAL_KIND(12), &
542541
array(3) = (/ 1, 2, 3 /)
543542
```
544543

545-
### Specification expressions
544+
## Specification expressions
546545

547546
It is possible to specify details of variables using any non-constant,
548547
scalar, integer expression that may also include inquiry function

0 commit comments

Comments
 (0)