SAC Command Reference Manual

SETBB

SUMMARY

Sets (defines) values of blackboard variables.

SYNTAX

SETBB variable {APPEND} value {variable {APPEND} value ...}

INPUT

variable:The name of a blackboard variable. It may be a new variable or one that already has a value. The variable name can be up to 32 characters in length.
value:The new value of that blackboard variable. It must be enclosed in single or double quotes if it contains any spaces.
APPEND:Append value to the old value of variable. If this option is omitted then the new value replaces the old value.

DESCRIPTION

The blackboard is a place to temporarily store information. This information can later be accessed by the GETBB command or used directly in a command by preceeding the name of the variable with a percent sign ("%".) If you want to concantenate some other text string on the end of a blackboard variable you need to put a second percent sign at the end of the name. You can also use the EVALUATE command to perform basic arithmetic operations on blackboard variables and store the results in new blackboard variables. You can unset (delete) blackboard variables using the UNSETBB command.

EXAMPLES

To set several blackboard variables at once:

SAC> SETBB C1 2.45 C2 4.94

To later use these variables in a command:

SAC> BANDPASS CORNERS %C1 %C2

To set a blackboard variable that contains spaces:

SAC> SETBB MYTITLE 'Sample filter response'

To check and make sure the value is correct:

SAC> GETBB MYTITLE
    MYTITLE = Sample filter response

To later use this variable in the title command it must be enclosed in quotes and have a percent sign on both ends of the name:

SAC> TITLE '%MYTITLE%'

See the section on Macros in the SAC Users Manual for more examples of the use of blackboard variables in macros.

OUTPUT_FORMAT

Prior to SAC v102.0, floating-point numbers in message, listhdr, and evaluate displayed limited precision. OUTPUT_FORMAT, introduced in v102.0, allows one to see values with higher precision. The command syntax is setbb output_format xxx, where xxx can be default (%g), short (%.4f), long (%.15f), shortG (%.5g), longG (%.15g), shortE (%.4e), longE(%.15e), and off (reverts to old SAC format). For examples showing the utility of OUTPUT_FORMAT, see the section on Floating-Point Precision in SAC in TUTORIAL.

SEE COMMANDS

GETBB, EVALUATE, UNSETBB, LISTHDR, MESSAGE

LATEST REVISION

Version 102,0