diff options
author | eschnett <eschnett@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2012-10-21 02:57:09 +0000 |
---|---|---|
committer | eschnett <eschnett@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2012-10-21 02:57:09 +0000 |
commit | ab7c40a7d1f444175defe862fe8e810c7a1cce5e (patch) | |
tree | 8e67abd7b5ffd72ab3dbd731eb832a28d7213dab /doc | |
parent | 9a108b61914daedf7a61c886d4e2e71988a33a5b (diff) |
Correct Fortran example for CCTK_Equals
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4878 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ReferenceManual.pdf | bin | 923684 -> 923722 bytes | |||
-rw-r--r-- | doc/ReferenceManual/CCTKReference.tex | 39 |
2 files changed, 20 insertions, 19 deletions
diff --git a/doc/ReferenceManual.pdf b/doc/ReferenceManual.pdf Binary files differindex 1e00596b..ed680a1c 100644 --- a/doc/ReferenceManual.pdf +++ b/doc/ReferenceManual.pdf diff --git a/doc/ReferenceManual/CCTKReference.tex b/doc/ReferenceManual/CCTKReference.tex index eff95d22..0e5cadb6 100644 --- a/doc/ReferenceManual/CCTKReference.tex +++ b/doc/ReferenceManual/CCTKReference.tex @@ -2932,12 +2932,12 @@ error returns from this function. */ void MyThorn_some_function(CCTK_ARGUMENTS) { -DECLARE_CCTK_PARAMETERS - -if (CCTK_Equals(my_parameter, "option A")) - { - CCTK_VInfo(CCTK_THORNSTRING, "using option A"); - } + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + + if (CCTK_Equals(my_parameter, "option A")) { + CCTK_VInfo(CCTK_THORNSTRING, "using option A"); + } } \end{verbatim} \end{Example} @@ -2946,21 +2946,22 @@ if (CCTK_Equals(my_parameter, "option A")) \begin{verbatim} #include "cctk.h" #include "cctk_Arguments.h" +#include "cctk_Functions.h" #include "cctk_Parameters.h" -c -c assume this thorn has a string or keyword parameter my_parameter -c -subroutine MyThorn_some_function(CCTK_ARGUMENTS) -implicit none -DECLARE_CCTK_PARAMETERS - -if (CCTK_Equals(my_parameter, "option A") .eq. 1) then - call CCTK_INFO("using option A"); -end if - -return -end subroutine MyThorn_some_function +! +! assume this thorn has a string or keyword parameter my_parameter +! +subroutine MyThorn_some_routine(CCTK_ARGUMENTS) + implicit none + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_FUNCTIONS + DECLARE_CCTK_PARAMETERS + + if (CCTK_Equals(my_parameter, "option A") /= 0) then + call CCTK_INFO("using option A") + end if +end subroutine MyThorn_some_routine \end{verbatim} \end{Example} \end{ExampleSection} |