Skip to main content
  • Home
  • Documentation
  • FAQ
  • Downloads
  • Support
  • Current Release Notes
  • Ferret Users Guide
    • Users Guide Index
    • Commands Reference
    • 1. Introduction
    • 2. Data Set Basics
    • 3. Variables & Expressions
    • 4. Grids & Regions
    • 5. Animations & Gif Images
    • 6. Customizing Plots
    • 7. Handling String Data Symbols
    • 8. Working with Special Data Sets
    • 9. Computing Environment
    • 10. Converting to NetCDF
    • 11. Writing External Functions
    • Glossary
    • Appendix A: Functions
    • Appendix B: PPLUS Guide
    • Appendix C: Ferret-Specific PPLUS Enhancements
  • Previous Release Notes
  • Tutorials and Demos
    • Ferret Tour
    • DSG files: Discrete Sampling Geometries Demo
    • Ferret sorting demo
    • Fast Fourier Transforms demo
    • Empirical Orthogonal Functions demo
    • Ferret objective analysis demo
    • Ferret Palette Demo
    • Map projections
    • Ferret polygon vector demo
    • Ferret Graticules demo
    • Ferret Polytube Demo
    • Ferret Polymark Demo
    • Ferret Constant-Array demo
    • Ferret land_detail demo
    • COADS Tour
    • Levitus Tour
    • Use OPeNDAP
    • Ferret binary read demo
  • PyFerret
    • PyFerret Downloads and Install ../../faq/ferret-faqs.html
    • What is PyFerret?
    • Why use PyFerret?
    • PyFerret for the Ferret user
    • PyFerret command syntax: quick-start notes
    • PyFerret for the Python user
    • Graphics in PyFerret ?
    • New Ferret functionality
    • PyFerret Python functions and constants
    • PyFerret Python objects and methods
    • Ferret external functions in Python
    • Ferret Fortran external functions
    • PyFerret metadata-and-data dictionaries
  • OPeNDAP
    • OPeNDAP usage in Ferret
    • Use OPeNDAP Demo
    • Test OPeNDAP

7.10 SYMBOL EDITING

Symbols may be edited and checked using the same controls that apply to journal file arguments.

The section of this users guide entitled "Arguments to GO tools" describes the syntax for checking and editing arguments. The identical syntax applies to symbols. As with the GO tool arguments (e.g., "$4"), all string manipulations are case insensitive.

In brief, the capabilities include:

default strings

 

If a symbol is undefined a default value may be provided using the pattern ($my_symbol%my default string%). For example,

 

($SHAPE%XY%)

check against list of acceptable values

 

A list of acceptable string values may be provided using the pattern
($my_symbol%|option 1|option 2|%). For example,

 

($SHAPE%|X|Y|Z|T|%)

 

will ensure that only 1-dimensional shapes (X, Y, Z, or T) are acceptable.

 

string substitution

 

Any of the optional string matches provided can invoke a substitution using the pattern ($my_symbol%|option 1>replacement|%). For example,

 

($SHAPE%|X>I|Y>J|Z>K|T>L|%)

 

will substitute I for X or J for Y, etc.

 

Asterisk ("*") provides default substitution

 

The asterisk character matches any string. For example,

 

($SHAPE%|X|Y|Z|T|*>other%)

 

will always result in "X," "Y," "Z," "T," or "other."

 

Asterisk ("*") provides limited string editing

 

The asterisk character, when used on the right hand side of a string substitution, inserts the original symbol contents

 

($SHAPE%|*>The shape is *|%)

error message control

 

An error message can be provided if the symbol is undefined or doesn't match any options. The pattern for this is
($my_symbol%|option 1|option 2|<error message text %). For example,

 

($SHAPE%|X|Y|Z|T|<Not a 1-dimensional shape%)