.. _example_ad_double-name:

!!!!!!!!!!!!!!!!!
example_ad_double
!!!!!!!!!!!!!!!!!

.. meta::
  :keywords: example_ad_double,an,example,using,the,ad_double,class,xrst_indent,begin,function,initialize,ok,independent,variable,addition,subtraction,multiplication,division,return,file

.. index:: example_ad_double, using, ad_double, class

.. _example_ad_double-title:

An Example Using the ad_double Class
####################################
This example mixes the documentation and the example code.
Another choice is to put the documentation and the beginning
an then just have comments in the code.

.. contents::
  :local:

.. index:: xrst_indent

.. _example_ad_double@xrst_indent:

xrst_indent
***********
This example make uses of ``xrst_indent`` so that
the xrst input can be indented at the same level as the code it is next to.

.. index:: begin, function

.. _example_ad_double@Begin Function:

Begin Function
**************
This function has no arguments and returns a boolean that is true,
if all it's tests pass, and false otherwise.

.. literalinclude:: ../../example/class.cpp
  :lines: 148-149
  :language: cpp

.. index:: initialize, ok

.. _example_ad_double@Initialize ok:

Initialize ok
*************

.. literalinclude:: ../../example/class.cpp
  :lines: 156-156
  :language: cpp

.. index:: independent, variable

.. _example_ad_double@Independent Variable:

Independent Variable
********************

.. literalinclude:: ../../example/class.cpp
  :lines: 162-164
  :language: cpp

.. index:: addition

.. _example_ad_double@Addition:

Addition
********

.. literalinclude:: ../../example/class.cpp
  :lines: 170-173
  :language: cpp

.. index:: subtraction

.. _example_ad_double@Subtraction:

Subtraction
***********

.. literalinclude:: ../../example/class.cpp
  :lines: 179-182
  :language: cpp

.. index:: multiplication

.. _example_ad_double@Multiplication:

Multiplication
**************

.. literalinclude:: ../../example/class.cpp
  :lines: 188-191
  :language: cpp

.. index:: division

.. _example_ad_double@Division:

Division
********

.. literalinclude:: ../../example/class.cpp
  :lines: 197-200
  :language: cpp

.. index:: return, ok

.. _example_ad_double@Return ok:

Return ok
*********

.. literalinclude:: ../../example/class.cpp
  :lines: 207-208
  :language: cpp

.. _example_ad_double@Example File:

Example File
************
:ref:`class_example@This Example File`
is the same as for the parent of this page.
