@node Glossary, Commands, Keywords, Top @chapter Glossary of Terms used in this Manual @findex glossary @table @dfn @item .sm See Environment File. @item Environment File When you start SM it looks in a file (by default called @file{.sm}) to discover where to find files that it needs (such as the default macros, the help files, and the font files). You can access variables stored in the environment file yourself, although this is probably seldom done by non-gurus. For more details, @pxref{Environment Variables}. @item Expression An SM expression is something that can appear on the right hand side of a @code{SET} command. More specifically, it is something that can appear as @emph{part} of the right hand side of a @code{SET} command (this excludes implied do loops: @code{SET x=1,10,2}). Expressions may also appear in other contexts, such as in the @code{ANGLE} command, or in @code{DEFINE name ( @r{expression} )}. A formal definition of an expression is given by the YACC grammar in @file{control.y} as the non-terminal symbol @code{expr}. @item Filecap Binary files produced by different programmes (and languages, and even compilers) are not identical, Fortran `unformatted' files being a glaring example. A filecap file is a database used to describe the byte-by-byte format of binary files, to allow SM to read them (using the @code{IMAGE} command). @item Graphcap There are a very large range of graphics terminals (and laser printers and so forth) in this world, and each seems to have its own set of commands. A graphcap file is a database that is able to describe (almost) all of these dialects, allowing SM to plot on a wide range of devices @item History SM remembers commands as you type them, so that you can repeat them or modify them (which includes correcting mistakes). The set of remembered commands is referred to as the history buffer. @item List The word @code{list} is used in a few places in the manual in the specific sense defined by the YACC grammar in @file{control.y}. A list is simply a list of words or numbers, and its meaning depends on the context. For example, @code{SET x=3*@{1 2 3@}} will set the vector @code{x} to be @code{2 4 6}, while @code{MACRO hi @{ echo Hello@}} will define the macro @code{hi}. @item Macro A macro is an abbreviation for a set of commands, so instead of typing a complicated sequence of commands you can simply type the macro's name. You can either think of macros as a new commands in their own right or as subroutines. @item Mongo Mongo is a plotting package written by John Tonry, and widely used in astronomy departments. SM's command language was based on Mongo's, and we have provided some support for an easy transition from Mongo to SM. @item p_expr A parenthesised expression. Many commands expect to be passed the name of a vector, but will accept an expression in parentheses; for example in the command @code{POINTS x (y + 2/z)}, @code{(y + 2/z)} is a p_expr. @findex parenthesised expression @item s_expr A scalar expression. This is a term used in some of the command descriptions; examples would be @code{210157}, @code{x[12]}, or @code{x}. In the latter case, the first element of the vector @code{x} would be used, so it is equivalent to @code{x[0]}. @item Stdgraph SM uses the stdgraph device driver for most devices, using the information in the graphcap file (@pxref{Graphcap}). @item String A string to SM is a sequence of characters enclosed in single quotes: @code{'This is a string'}. Strings are primarily used in vector expressions, but are also used in a few other places (e.g. to specify a format for a @code{PRINT} or @code{READ} command). Note that characters in double quotes are @emph{not} strings to SM, merely characters protected from variable expansion. @item Termcap Terminals come in many, many, flavours and types. Their peculiarities are described by a termcap file, allowing SM's command editor to run on (almost) any terminal. @item @TeX{} @TeX{} is a typesetting language developed by Donald Knuth. We provide an emulation of certain parts of @TeX{}'s mathematics mode in SM's label commands. @item Overload A keyword (such as @code{DEFINE} or @code{SET}) is said to be @emph{overload}ed if its meaning has been changed. Usually this will be by adding functionality, rather than by actually changing what it does. @item Variable A variable is an abbreviation for a sequence of characters, and may appear anywhere that the characters in question could appear. Even if the variable contains a number (e.g. @code{6.62559e-34}) it is still just a characters, although SM may choose to treat them as a number in some contexts (e.g. the right-hand side of a @code{SET} command). @item Vector A set of one (actually, zero) or more elements. The elements can be either numerical (floating point) or strings. Vectors are SM's primary data type. Do not confuse a 1-element vector (a scalar) with a variable (@pxref{Variables}). @item YACC The SM command language is written in a language called YACC (which is supported on Unix systems). We have provided an implementation of YACC called Bison in the SM distribution. @end table