[Thread Prev][Thread Next][Index]

[ferret_users] Strange behavior between STRRINDEX and low case variable names



I have a strange behavior with low case variable names and STRRINDEX

The script :


SET MODE VERIFY

DEFINE SYMBOL MON_file "/path/to/file/My-File.nc"

LET V_MON_FILE = "($MON_file)"
LET v_MON_file = "($MON_file)"

SAY `v_MON_file`
SAY `V_MON_FILE`

LET p_sla = `STRRINDEX ( V_MON_FILE, "/") `
LET p_sla = `STRRINDEX ( v_MON_file, "/") `

And the result :


yes? go essai.jnl
SET MODE VERIFY

DEFINE SYMBOL MON_file "/path/to/file/My-File.nc"

LET V_MON_FILE = "($MON_file)"
 !-> DEFINE VARIABLE V_MON_FILE = "/path/to/file/My-File.nc"
LET v_MON_file = "($MON_file)"
 !-> DEFINE VARIABLE v_MON_file = "/path/to/file/My-File.nc"

SAY `v_MON_file`
 !-> MESSAGE/CONTINUE /path/to/file/My-File.nc
/path/to/file/My-File.nc
SAY `V_MON_FILE`
 !-> MESSAGE/CONTINUE /path/to/file/My-File.nc
/path/to/file/My-File.nc

LET p_sla = `STRRINDEX ( V_MON_FILE, "/") `
 !-> DEFINE VARIABLE p_sla = 14
LET p_sla = `STRRINDEX ( v_MON_file, "/") `
 **ERROR: variable unknown or not in data set:  _MON_
DEFINE VARIABLE p_sla = `STRRINDEX ( v_MON_file, "/") `
Command file, command group, or REPEAT execution aborted

STRRINDEX removes low case letter in the variable name. This is in Ferret 7.0, and was not observed in Ferret 6.9*


Olivier

-- 
Dr. Olivier Marti  - mailto:olivier.marti@xxxxxxxxxxxx
Laboratoire des Sciences du Climat et de l'Environnement
Institut Pierre Simon Laplace
Laboratoire CEA-CNRS-UVSQ  -  UMR 8212
Tel : +33 1 69 08 77 27 - Mob : +33 6 45 36 43 74
Fax : +33 1 69 08 30 73




[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement