From ab7c40a7d1f444175defe862fe8e810c7a1cce5e Mon Sep 17 00:00:00 2001 From: eschnett Date: Sun, 21 Oct 2012 02:57:09 +0000 Subject: Correct Fortran example for CCTK_Equals git-svn-id: http://svn.cactuscode.org/flesh/trunk@4878 17b73243-c579-4c4c-a9d2-2d5706c11dac --- doc/ReferenceManual.pdf | Bin 923684 -> 923722 bytes doc/ReferenceManual/CCTKReference.tex | 39 +++++++++++++++++----------------- 2 files changed, 20 insertions(+), 19 deletions(-) (limited to 'doc') diff --git a/doc/ReferenceManual.pdf b/doc/ReferenceManual.pdf index 1e00596b..ed680a1c 100644 Binary files a/doc/ReferenceManual.pdf and b/doc/ReferenceManual.pdf differ 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} -- cgit v1.2.3