[Thread Prev][Thread Next][Index]

Re: [ferret_users] Checking the argument in Go script




I've never heard of QUERY either, but there are some situations when using the $n arguments fail. For instance using them to write filenames when two of these in sequence ($1$2), or with an underscore before it.

I just define regular symbols for them:
def sym dol1 `$1`
def sym dol2 `$2`

These can be used freely.

You can also have a script define a default value that the argument will take if the command that calls the script doesn't include a value:

def sym symbol_name $1"default_value"

Billy


On Tue, Dec 20, 2022 at 10:03 PM Ryo Furue <furue@xxxxxxxxxx> wrote:
Dear Mark,

I have a very simple question.  I want to check the value of arguments in GO scripts, e.g. $1 $2 and so on when a program is running.


I suppose you want to print out the values on your screen.  If so,

\cancel mode verify
say 1st arg = ($1)
say 2nd arg = ($2)
set mode/last verify

(Switching off and on of the verify mode is optional.)
 

 

If I include the command QUERY $1 in a GO script the value is returned to the terminal but the program stops.


Because I've never heard of QUERY, I'll leave this issue for more knowledgeable people.

Ryo


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

Privacy Policy | Disclaimer | Accessibility Statement