File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 11Examples
22========
33
4- This directory contains two example programs.
4+ This directory contains several example programs.
5+
6+ Example of recommended use
7+ --------------------------
8+ The [ invoke-via-macro.F90] example demonstrates the recommended ways
9+ to write assertions in code. These leverage the function-like macros
10+ ` call_assert ` and ` call_assert_describe ` . The primary advantage of
11+ using these macros is that they are completely eliminated when a file
12+ is compiled with the ` ASSERTIONS ` macro undefined or defined as ` 0 ` .
13+ To run this example with assertions off, use the command
14+ ```
15+ fpm run --example invoke-via-macro
16+ ```
17+ To run the example with assertions on, use either of the following
18+ commands:
19+ ```
20+ fpm run --example invoke-via-macro --flag "-DASSERTIONS"
21+ ```
522
623Simple examples
724---------------
@@ -39,6 +56,7 @@ or more images providing stop codes analogous to those quoted in the [Single-ima
3956[ Enforcing programming contracts ] : #enforcing-programming-contracts
4057[ Single-image execution ] : #single-image-execution
4158[ simple_assertions.f90 ] : ./simple_assertions.f90
59+ [ invoke-via-macro.F90 ] : ./invoke-via-macro.F90
4260[ UML ] : https://en.wikipedia.org/wiki/Unified_Modeling_Language
4361[ OCL ] : https://en.wikipedia.org/wiki/Object_Constraint_Language
4462[ Atom ] : https://atom.io
You can’t perform that action at this time.
0 commit comments