[Thread Prev][Thread Next][Index]

Re: [ferret_users] How can I check the variable



Hi Guimond,

I would like to execute different command
depending on whether or not a variable is defined.

For example, if the variable "A" is defined then I would like to execute "say `A`".
If the variable "A" is NOT defined then I would like to execute "say `B`".

How can I make it?

Hiroyuki Tomita

On 2005/08/30, at 23:16, Steve Guimond wrote:

Hello:
If you would like to check whether or not a variable is defined in your
script, after you have defined a variable you could say:

let test = 20
say `test`

This will return the value of test to see if it is defined the way you
want.

Steve

Steve Guimond
Research Assistant
The Center for Ocean-Atmospheric Prediction Studies

On Tue, 30 Aug 2005, Hiroyuki Tomita wrote:


Hello Ferreters,

I would like to check whether the variable is defined or not in my go
script.
How can I do it?

Thank you for your help.

Hiroyuki Tomita









[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement