Changes between Version 3 and Version 4 of user/nicolasmartin/Commit Message


Ignore:
Timestamp:
2019-10-10T11:55:26+02:00 (12 months ago)
Author:
nicolasmartin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • user/nicolasmartin/Commit Message

    v3 v4  
    22These changes enable sufficient support for allocatable, zero-dimension character variables defined using the: 
    33 
    4 {{{ 
     4{{{#!f 
    55CHARACTER(LEN=:), ALLOCATABLE :: cstr 
    66}}} 
     
    88syntax. This is supported by: 
    99 
    10 1. Adding : as a valid length identifier at line 1028 in fortran.y (and then rebuilding fortran.c and main.c via make -f Makefile.lex) 
    11 2. Adding a carrayu entry to Agrif_Variable_c type in AGRIF_FILES/modtypes.F90 where carrayu is declared as: 
    12 {{{#!c++ 
     101. Adding : as a valid length identifier at line 1028 in ''fortran.y'' (and then rebuilding ''fortran.c'' and ''main.c'' via `make -f Makefile.lex`) 
     112. Adding a `carrayu` entry to Agrif_Variable_c type in ''AGRIF_FILES/modtypes.F90'' where `carrayu` is declared as: 
     12{{{#!f 
    1313   character(:)  ,                 allocatable :: carrayu 
    1414}}} 
    15 3. Ensuring correct deallocation of carrayu in AGRIF_FILES/modsauv.F90 and AGRIF_FILES/modutil.F90 
    16 4. Substituting carrayu in place of carray0 declarations when character length matches : for zero-dimension variables. This occurs twice in LIB/toamr.c, e.g: 
    17 {{{ 
     153. Ensuring correct deallocation of `carrayu` in ''AGRIF_FILES/modsauv.F90'' and ''AGRIF_FILES/modutil.F90'' 
     164. Substituting `carrayu` in place of carray0 declarations when character length matches : for zero-dimension variables. This occurs twice in ''LIB/toamr.c'', e.g: 
     17{{{#!CC 
    1818        if (!strcasecmp(var->v_dimchar  ,":") && var->v_nbdim == 0 ) 
    1919        { 
     
    2424}}} 
    2525Any such character variables must be allocated by the user. Typically this is done with lines such as: 
    26 {{{ 
     26{{{#!f 
    2727      IF ( .NOT. ALLOCATED(cdnambuff) ) ALLOCATE( CHARACTER(LEN=kleng) :: cdnambuff ) 
    2828}}} 
    29 making AGRIF accept the CHARACTER(LEN=kleng) :: construct within the ALLOCATE statement was beyond my skills. Fortunately, for the current purpose, this 
     29making AGRIF accept the `CHARACTER(LEN=kleng) :: construct` within the `ALLOCATE` statement was beyond my skills. Fortunately, for the current purpose, this 
    3030isn't necessary since such allocations only occur within utility routines in which the appropriate tabvar has been passed down. So: 
    31 {{{ 
     31{{{#!f 
    3232!$AGRIF_DO_NOT_TREAT 
    3333      IF ( .NOT. ALLOCATED(cdnambuff) ) ALLOCATE( CHARACTER(LEN=kleng) :: cdnambuff )