Next: , Previous: Usage, Up: Usage


8.1 Simplest example

As a nice simple, indeed trivial example consider the following:

  1. Include ‘nana.h’ in your project wide include file.
  2. Use ‘I’ to check invariants in your code. In particular all functions or methods should be required to check their pre and post conditions.
  3. Use ‘DL’ to print debugging messages in your code. This means that debugging messages only occur when you run the program under the debugger.1

Footnotes

[1] Of course you also need to use the gdb commands generated by the ‘nana’ command, perhaps using ‘nana-clg’.