Personal tools
You are here: Home Documentation Users Guide 1. Introduction 1.4 COMMAND SYNTAX
Document Actions


by Catherine Nunkai — last modified 2009-08-11 16:17

Commands in program Ferret conform to the following template:

COMM [/Q1/Q2...] [SUBCOM[/S1/S2...]] [ARG1 ARG2 ...] [!comment]



is a command name yes? LIST


are qualifiers of the command yes? CONTOUR/SET_UP


is a subcommand name yes? SHOW MODE


are qualifiers of the subcommand yes? SET LIST/APPEND


are arguments of commands yes? CANCEL MODE INTERPOLATE


  • The length of the command line is limited to a maximum of 2048 characters.
  • Command lines ending with back slash are regarded as incomplete -- a special prompt is given to indicate that the next line is a continuation .
  • Items in square brackets are optional.
  • One or more spaces or tabs must separate the command from the subcommand and from each of the arguments. Spaces and tabs are optional preceding qualifiers.
  • Multiple commands, separated by semi-colons, can be given on the same line.
  • Command names, subcommand names, and qualifiers require at most 4 characters.
    (e.g., yes? CANCEL LIST/PRECISION is equivalent to yes? CANC LIST/PREC)
  • Some qualifiers take an argument following "=" (e.g., yes? LIST/Y=10S:10N).
  • An exclamation mark normally signifies the end of a command and the start of (optional) comment text.
  • The backslash character (\), when placed directly before an exclamation point (!), apostrophe ('), semicolon (;), or forward slash (/), will hide it ("escape it") from Ferret.
  • See the Expressions section for information on algebraic expressions as arguments to commands
  • See the Symbols sections for information on symbol substitution in commands


  • A simple command and argument
    yes? LIST sst

  • A comment on the command line
    yes? SET REGION/L=1/X=130:290/Y=-23:23 ! January in the Tropical Pacific
  • Commands with qualifiers and arguments
    yes? VECTOR/L=30/COLOR=RED u,v
    yes? LET/UNITS=M ht = z[GZ=temp] - z0
  • Subcommands
    yes? SET REGION/X=130E:120W/J=20:40/Z=0/T=1-jan-1982:31-jan-1992

  • Symbols used in a command. Note multiple commands on a line
    yes? DEFINE SYMBOL lower = -2; DEFINE SYMBOL upper = 6
    yes? SHADE/I=($lower):($upper) temp

  • Use Square brackets to specify a variable's dataset or grid, range and optionally a delta- for the variable, or a transformation )
    yes? PLOT temp[X=180,L=1:50]
    yes? LIST temp[X=130:200@AVE,L=1:50:5]
    yes? LET/UNITS=M ht = z[GX=temp] - z0
  • Immediate mode expression: enclosed in grave accents. (The expression must evaluate to a scalar, and is evaluated before the command is parsed or executed.)
    yes? CONTOUR/Z=`temp[X=180,Y=0,Z=@LOC:15]` salt
  • A list of values (constant array) may be formed by enclosing values in curly brackets. For example in a function call:
    yes? LET aday = DAYS1900(1989,{3,6,9},1)
  • Text for labels is enclosed in double quotes
    yes? VECTOR/TITLE="title_string" x_expr, y_expr
    If the string is to contain a quote, the backslash preserves it:
    yes? GO my_go_script "\"(-10,10,2)"\"
    sends the string "(-10,10,2)" to the script for more on go scripts

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: