next up previous contents
Next: Input and output commands Up: Model development in Alamode Previous: Model development in Alamode

Commands Overview

The shell used by Alamode is an extension of a standard TCL shell. This document makes no attempt to teach TCL. See Tcl and the Tk Tookit by John K. Ousterhout [3] for a definitive reference on TCL.

Recommended reading in Tcl and the Tk Tookit:

Both ordered and unordered lists are used extensively in Alamode\ model descriptions: unordered lists of operators are used to create an equation and ordered lists are used to pass parameters to operators and functions. Although TCL provides two ways to create lists (i.e. via the list command or using quoting), the list command should always be used. The list command always does the right thing, even if the values of variables used to build up the list contain spaces. The following example demonstrates the differences.

# The variable "a" contains a space.
% set a "foo bar"
foo bar
% set b "baz"
baz
# Quoting does not preserve the space.
% set c "$a $b"   
foo bar baz
% set d [list $a $b]
{foo bar} baz
# The result is a list with three items instead of the expected 2 item.
% llength $c
3
% llength $d
2

The Alamode shell is not an extension of the SUPREM shell. One difference between the SUPREM command language and Alamode's is that parameters use -tag value, which is common in TCL extensions, as opposed to SUPREM's GENII-style tag = value. Another key difference is that many commands return usable values. These values are used to build up a data structure describing a model. Some of the commands also create new commands, which can then be used as any other Alamode command.

Beyond the standard TCL shell commands, Alamode provides commands for input/output of mesh via file formats described in Appendix 5 and Appendix 6, query of regions and fields, model definition, and model solution. These commands are discussed in detail in the following sections.


next up previous contents
Next: Input and output commands Up: Model development in Alamode Previous: Model development in Alamode

Dan Yergeau
Wed Aug 20 14:01:54 PDT 1997