Go to the first, previous, next, last section, table of contents.

# gcl: the Geomview Command Language

Gcl has the syntax of lisp -- i.e. an expression of the form (f a b ...) means pass the values of a, b, ... to the function f. Gcl is very limited and is by no means an implementation of lisp. It is simply a language for expressing commands to be executed in the order given, rather than a programming language. It does not support variable or function definition.

Gcl is the language that Geomview understands for files that it loads as well as for communication with other programs. To execute a gcl command interactively, you can bring up the Commands panel which lets you type in a command; Geomview executes the command when you hit the `Enter` key. Output from such commands is printed to standard output. Alternately, you can invoke Geomview as `geomview -c -` which causes it to read gcl commands from standard input.

Gcl functions return a value, and you can nest function calls in ways which use this returned value. For example

    (f (g a b))

evaluates `(g a b)` and then evaluates `(f x)` where `x` is the result returned by `(g a b)`. Geomview maintains these return values internally but does not normally print them out. To print out a return value pass it to the `echo` function. For example the `geomview-version` function returns a string representing the version of Geomview that is running, and

    (echo (geomview-version))

prints out this string.

Many functions simply return `t` for success or `nil` for failure; this is the case if the documentation for the function does not indicate otherwise. These are the lisp symbols for true and false, respectively. (They correspond to the C variables `Lt` and `Lnil` which you are likely to see if you look at the source code for Geomview or some of the external modules.)

In the descriptions of the commands below several references are made to "OOGL" formats. OOGL is the data description language that Geomview uses for describing geometry, cameras, appearances, and other basic objects. For details of the OOGL formats, See section OOGL File Formats. (Or equivalently, see the oogl(5) manual page, distributed with Geomview in the file man/cat5/oogl.5.

The gcl commands and argument types are listed below. Most of the documentation in this section of the manual is available within Geomview via the `?` and `??` commands. The command `(? command)` causes Geomview to print out a one-line summary of the syntax of command, and `(?? command)` prints out an explanation of what command does. You can include the wild-card character `*` in command to print information for a group of commands matching a pattern. For example, `(?? *emodule*)` will print all information about all commands containing the string `emodule`. `(? *)` will print a short list of all commands.

- Argument Conventions: Conventions used in describing argument types.
- Gcl Reference: Documentation for each gcl command.

Go to the first, previous, next, last section, table of contents.