[Thread Prev][Thread Next][Index]

Re: IF syntax and variable test



Ok I just found out what's wrong.
Just in case of someone would be working on the same kind of problem, I simply reply to myself to spread the information.

In fact, LET is a shorcut for DEFINE VARIABLE. But as my variables are rather characters than numbers, they must be defined with DEFINE SYMBOL. Then the below test miraculously works !

Emilie V.

Emilie Vanvyve a écrit:
Hello everyone !
I hope you can help me ... Does anyone know why this IF syntax does not work with my variable arg2 ?

LET arg2 = "mar"
IF ($arg2"T|mar>F|lsc>F|both>F|diff>F|") THEN USE "`arg2`"
 !-> IF T      THEN USE "$arg2"


Because it works with arguments taken from GO scripts ($3 for example in go script $1 $2 $3), but not with user-defined argument (it seems so, I hope I'm wrong). For example, if I call the script XX with 3 arguments : GO scriptX  lsc  both  mar
And then in this script there is this line :  IF $3"T|mar>F|lsc>F|both>F|diff>F|" THEN EXIT. It works !

Have a nice day and thank you !

Emilie V.


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement