Changeset 26 for readTracFiles_mod.f90


Ignore:
Timestamp:
Jan 23, 2023, 4:19:51 PM (22 months ago)
Author:
dcugnet
Message:

Modification to solve a gfortran specific bug ; this compiler wrongly claims:

Error: Ambiguous interfaces in generic interface 'fgetkey' for ‘fgetkeynam_s1’ at (1) and ‘fgetkey_sm’ at (2)
But they are not:

FUNCTION fgetKeyNam_s1(tname, keyn, ky[, def_val, lerr]) RESULT(val) with val being a scalar string
FUNCTION fgetKeym ( keyn, ky[, def_val, lerr]) RESULT(val) with val being a vector string

So no way to have a single generic interface => gGetKey_sm is renamed fGetKeys.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • readTracFiles_mod.f90

    r25 r26  
    1212  PUBLIC :: trac_type, setGeneration, indexUpdate               !--- TRACERS  DESCRIPTION ASSOCIATED TOOLS
    1313  PUBLIC :: testTracersFiles, readTracersFiles                  !--- TRACERS FILES READING ROUTINES
    14   PUBLIC :: getKey, fGetKey, setDirectKeys                      !--- TOOLS TO GET/SET KEYS FROM/TO  tracers & isotopes
     14  PUBLIC :: getKey, fGetKey, fGetKeys, setDirectKeys            !--- TOOLS TO GET/SET KEYS FROM/TO  tracers & isotopes
    1515  PUBLIC :: getKeysDBase,    setKeysDBase                       !--- TOOLS TO GET/SET THE DATABASE (tracers & isotopes)
    1616
     
    100100  INTERFACE  old2newH2O;   MODULE PROCEDURE  old2newH2O_1,  old2newH2O_m;        END INTERFACE old2newH2O
    101101  INTERFACE  new2oldH2O;   MODULE PROCEDURE  new2oldH2O_1,  new2oldH2O_m;        END INTERFACE new2oldH2O
    102   INTERFACE fGetKey;       MODULE PROCEDURE fgetKeyIdx_s1, fgetKeyNam_s1, fgetKey_sm;        END INTERFACE fGetKey
     102  INTERFACE fGetKey;       MODULE PROCEDURE fgetKeyIdx_s1, fgetKeyNam_s1;        END INTERFACE fGetKey
    103103  INTERFACE tracersSubset; MODULE PROCEDURE trSubset_Indx, trSubset_Name, trSubset_gen0Name; END INTERFACE tracersSubset
    104104  INTERFACE idxAncestor;   MODULE PROCEDURE idxAncestor_1, idxAncestor_m, idxAncestor_mt;    END INTERFACE idxAncestor
     
    14101410END FUNCTION fgetKeyNam_s1
    14111411!==============================================================================================================================
    1412 FUNCTION fgetKey_sm(keyn, ky, def_val, lerr) RESULT(val)
     1412FUNCTION fgetKeys(keyn, ky, def_val, lerr) RESULT(val)
    14131413CHARACTER(LEN=maxlen),        ALLOCATABLE :: val(:)
    14141414  CHARACTER(LEN=*),           INTENT(IN)  :: keyn
     
    14211421  val = [(fgetKeyIdx_s1(it, keyn, ky, def_val, ler(it)), it = 1, SIZE(ky))]
    14221422  IF(PRESENT(lerr)) lerr = ANY(ler)
    1423 END FUNCTION fgetKey_sm
     1423END FUNCTION fgetKeys
    14241424!==============================================================================================================================
    14251425
Note: See TracChangeset for help on using the changeset viewer.