From f1616b9801380fecd8885f21cacae571a1c4a91c Mon Sep 17 00:00:00 2001 From: jthorn Date: Thu, 9 Feb 2006 13:00:58 +0000 Subject: use size_t for 1-D array index in CCTK_GFINDEX3D example git-svn-id: http://svn.cactuscode.org/flesh/trunk@4252 17b73243-c579-4c4c-a9d2-2d5706c11dac --- doc/UsersGuide/ThornWriters.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/UsersGuide/ThornWriters.tex b/doc/UsersGuide/ThornWriters.tex index 618a5dd0..0b2d7c10 100644 --- a/doc/UsersGuide/ThornWriters.tex +++ b/doc/UsersGuide/ThornWriters.tex @@ -1964,6 +1964,7 @@ this is generally the preferred form for general use. \begin{figure}[bp] \begin{verbatim} +#include /* defines size_t */ #include "cctk.h" void MyThorn_MyFunction(CCTK_ARGUMENTS) @@ -1976,7 +1977,7 @@ int i,j,k; { for (i = 0 ; i < cctk_lsh[0] ; ++i) { - const int posn = CCTK_GFINDEX3D(cctkGH, i,j,k); + const size_t posn = CCTK_GFINDEX3D(cctkGH, i,j,k); /* calculate the global xyz coordinates of the (i,j,k) grid point */ /* (in a multipatch/multiblock context, this gives the per-patch coordinates) */ -- cgit v1.2.3