navigation map

Chapters:
  1: Introduction
  2: Simple example
  3: Invocation
  4: Finer Control
  5: X-Y Plots
  6: Contour Plots
  7: Image Plots
  8: Examples
  9: Gri Commands
  10: Programming
  11: Environment
  12: Emacs Mode
  13: History
  14: Installation
  15: Gri Bugs
  16: Test Suite
  17: Gri in Press
  18: Acknowledgments
  19: License

Indices:
  Concepts
  Commands
  Variables
index.html#Top ListOfGriCommands.html#ListOfGriCommands Gri: List of commands Gri: `cd' command index.html#Top Gri: `cd' command

9.3.1: `assert'


`assert .condition. ["message"]

The condition may be a variable, a synonym, or an RPN expression. If this condition is true (i.e. evaluates to a non-zero number), do nothing. If the condition is false, the program will terminate with an error condition (in unix, it will terminate with a non-zero exit code).

Before termination, a message will be printed, the form of which depends on the optional `"message"' string.

If no `"message"' string is given, the the printed message will indicate the name of the command-file and the line at which the assert command was encountered.

If a `"message"' string is given, and if it ends in a newline (`"\\n"'), then this string is printed.

If a `"message"' string is given, and if it does not end in `"\\n"', then the string is printed along with an indication of the location in the command-file.

(Perl users will recognize this as being patterned on the `"die"' command.)

navigation map