diff options
author | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2003-03-11 07:58:44 +0000 |
---|---|---|
committer | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2003-03-11 07:58:44 +0000 |
commit | 48ced1a112fd3625c8c997e33fb936f2ca42b241 (patch) | |
tree | 0b92e3bf74949177cd7869e5bd2d9c57be4dc043 /doc/FAQ | |
parent | e24649b1f5b93f2462ed48f029f3ddc9fb484254 (diff) |
E13 I want to write the value of a KEYWORD parameter in Fortran code to
a file, but nothing I try works.
Cactus KEYWORD and STRING parameters are not stored as Fortran strings
(they are pointers to C strings) so you need to convert them first.
Use the routine CCTK_FortranString to copy them to a locally defined
Fortran string, then you can manipulate them as usual. If you just
want to print the value to the standard output there is also the
routine CCTK_PrintString.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3169 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'doc/FAQ')
-rw-r--r-- | doc/FAQ | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -1,7 +1,7 @@ Cactus Code Frequently Asked Questions -$Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/doc/FAQ,v 1.60 2003-03-04 08:07:29 allen Exp $ +$Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/doc/FAQ,v 1.61 2003-03-11 07:58:44 allen Exp $ Also available at http://www.cactuscode.org/Documentation/FAQ @@ -221,6 +221,9 @@ E12 I'm getting wierd syntax errors in Fortran code, with an extra garbage character (often $ or &) stuck in the middle of a CCTK_INFO() or CCTK_WARN() or CCTK_EQUALS() call after it has been processed. +E13 I want to write the value of a KEYWORD parameter in Fortran code to + a file, but nothing I try works. + ------------------------------------------------------------------------------ General @@ -1200,6 +1203,16 @@ E12 I'm getting wierd syntax errors in Fortran code, with an extra test_state = 0 end if +E13 I want to write the value of a KEYWORD parameter in Fortran code to + a file, but nothing I try works. + + Cactus KEYWORD and STRING parameters are not stored as Fortran strings + (they are pointers to C strings) so you need to convert them first. + Use the routine CCTK_FortranString to copy them to a locally defined + Fortran string, then you can manipulate them as usual. If you just + want to print the value to the standard output there is also the + routine CCTK_PrintString. + ------------------------------------------------------------------------------ General |