You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-13Lines changed: 8 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,15 +12,15 @@ Overview
12
12
--------
13
13
This assertion utility contains four public entities:
14
14
15
-
1. An `assert` subroutine,
16
-
2. A `characterizable_t` abstract type supporting `assert`, and
17
-
3. An `intrinsic_array_t` non-abstract type extending `characterizable_t`.
18
-
4. An `assert_macros.h` header file containing C-preprocessor macros.
15
+
* An `assert_macros.h` file defining the recommended preprocessor macros for writing assertions:
16
+
-`call_assert(assertion)`
17
+
-`call_assert_describe(assertion, description)`
18
+
* An `assert` subroutine
19
19
20
20
The `assert` subroutine
21
21
* Error-terminates with a variable stop code when a caller-provided logical assertion fails,
22
22
* Is callable inside `pure` procedures, and
23
-
* Can be eliminated at compile-time, as controlled by the `ASSERTIONS` preprocessor define.
23
+
* Can be eliminated by not defining the `ASSERTIONS` preprocessor macro.
24
24
25
25
Assertion enforcement is controlled via the `ASSERTIONS` preprocessor macro,
26
26
which can be defined to non-zero or zero at compilation time to
@@ -164,9 +164,7 @@ fpm test --compiler nagfor --flag -fpp
164
164
Documentation
165
165
-------------
166
166
167
-
See [Assert's GitHub Pages site] for HTML documentation generated with [`ford`].
168
-
169
-
For further documentation, please see [example/README.md] and the [tests]. Also, the code in [src] has comments formatted for generating HTML documentation using [FORD].
167
+
Please see [example/README.md] and the [tests] for examples of how to use Assert.
170
168
171
169
### Potential pitfalls of `call_assert` macros:
172
170
@@ -178,7 +176,7 @@ of aggressively asserting invariants throughout their code, without needing to
178
176
balance any potential performance cost associated with such assertions when the
179
177
code runs in production.
180
178
181
-
Unfortunately, C-preprocessor macros do not integrate cleanly with some aspects
179
+
Unfortunately, preprocessor macros do not integrate cleanly with some aspects
182
180
of the Fortran language. As such, you might encounter one or more of the
183
181
following pitfalls when using these macros.
184
182
@@ -212,7 +210,7 @@ In the case of gfortran, this appears to have been resolved by default starting
212
210
#### Line breaks in macro invocations
213
211
214
212
The preprocessor is not currently specified by any Fortran standard, and
215
-
as of 2024 its operation differs in subtle ways between compilers.
213
+
as of 2025 its operation differs in subtle ways between compilers.
216
214
One way in which compilers differ is how macro invocations can safely be broken
217
215
across multiple lines.
218
216
@@ -286,9 +284,6 @@ See the [LICENSE](LICENSE) file for copyright and licensing information.
0 commit comments