There is a macro era defined as DELETE
HISTORY ERASE that wouldn't have appeared on the list in the first place,
similarly lis is like HISTORY but won't appear on the list
of commands. As an alternative, you can use the macro set_overload
to make lowercase erase the same as DELETE HISTORY erase,
along with a
number of other changes. This could be confusing for neophytes!
See "overloading"
It is usually easier to use SM's editor to
create macros, try ed square or read on.
or q
which is a macro defined as DELETE
HISTORY QUIT. This will exit SM just the same, but the
quit won't appear on your history list, waiting to be playedback
accidently. Actually, q will query you before quitting
If you are using VMS, you may prefer to use
^Y as your
interrupt character. A suitable set of key definitions is in a file called
maps_vms.dat in the top SM directory. It may be read
with the READ EDIT command (see section Changing Key-Bindings), and this may be done
automatically in your
startup macro by the variable edit in your
`.sm' file.
In fact you can rebind any character to replace ^, see section Command History
Under VMS, SM must have been installed as a foreign command for this to work, and it must not have been linked with the debugger
Occasionally a <CR> is required by SM, so putting two commands on one line will give a syntax error. The cause is the way that the grammar is written (see section The Command Interpreter), the fix is either to use two lines, or else to put an explicit carriage return at the appropriate point with a \n
^^ and ^$ really do get back the
last command typed, even if it isn't on the history list. If you
want the last remembered command, use up-arrow or ^P
The first of these commands in a SM session may be rather slow under VMS, as we have to spawn a subprocess.
Unfortunately, this is currently not available to VMS users
unless you have been playing with OVERLOAD
usually; this may not be available on Unix System V and VMS systems.
you might prefer to
use the macro ed which
is equivalent to MACRO EDIT, but doesn't appear on the history
list and, if invoked without a macro name, will edit the same macro as
last time. In addition, you can list the current macro with hm.
well, to be honest the LOCAL command's a recent addition to SM so there are lots of macros out there that don't do this
Actually, if the environment
(VMS: logical) `.sm' variable PRINTER is defined the macros pretend
that it was the first argument, so you can simply type hcopy.
The {} turn off all
expansions, so hi is defined to be
<"$!('Hello')" World>. The statement defining hello then becomes
DEFINE hello <"$!('Hello')" World>, and the `!' ensures that the
expression 'Hello' is evaluated and substituted; 'Hello' is
a string valued vector, admittedly with only one element, so it evaluates to
the five characters `Hello' and the statement becomes
DEFINE hello <Hello World> which means that hello is defined
as Hello World. Apart from being a red herring, the colons are only
there to make it easy to see which variable expands to what.
Due to a VMS RTL bug, this command is not available on all VMS systems.
This isn't actually the preferred way to create
a postscript file; it's better to use a specialised device such as
postfile (see section Device), or at least to say
device postscript ":SY=mv $F foo.ps:" (see section Device).
Why not? Because there are too many possible formats. SM goes to
a lot of trouble to read, e.g. fits files written using VMS fortran,
and RHL cannot face the equivalent headaches arising from writing IMAGES
to disk.
You are not allowed to use commas in such a list,
so set x={1, 2, 3, 4 } makes x a string vector; but
set x=atof(x) soon fixes that (or say set x=atof({1, 2, 3, 4 })
in the first place). You can use index and
substr to achieve the same result for truly string-valued vectors.
you can often do better with a ?: or
SET WORD[expr] = expr command
The grammar is actually specified using YACC, see S.C. Johnson YACC: Yet Another Compiler Compiler, Computing Science Technical Report No. 32, 1975, AT&T Bell laboratories, Murray Hill, NJ07974. This report is reprinted in section 2b of the UNIX manual, and is rather difficult reading at first. We do not in fact use the AT&T code, which is proprietary, but rather a public domain compiler-compiler called Bison written by the Free Software Foundation.
Specifying -s on the command line bypasses all
of this, and makes SM read input one line at a time.
i.e. tokens that have been recognised, typically keywords
Graphics I/O Design, Doug Tody, March 1985. NOAO (Kitt Peak)
Actually, SM always uses cursor 1
In counting characters for jumps, the ; is at character 0 and combinations such as ^N count as one character
If the RC string
is given as prompt, then you will be prompted for the key you would
have hit, and the (x,y) position the cursor would have been at, if the
terminal that you were using could support a cursor.
In looking for the graphcap file, any environment file
or search path specified on the SM command line with a -f or -u
flag is ignored.
Under Unix
the loader can often distinguish fortran from C, so you may not
need the `f' -- call sm_limits(0.0,1.0,0.0,1.0)
in fact they will be read from a macro
or the command line without prompting if they are available; try
define file_type no_header image file \n 10 20
The usual reference is Wells, D.C., et al. Astron. Astroph. Suppl, 44 363 (1981), although FITS is in fact becoming a national standard in the US
created by Dr. A. V. Hershey at the U. S. National Bureau of Standards and illustrated in National Bureau of Standards publication NBS SP-24. The format used in the hershey_oc.dat file was originally due to James Hurt at Cognition, Inc., 900 Technology Park Drive, Billerica, MA 01821. It may be converted to any format except the format distributed by the U. S. NTIS (whatever it may be). We have to tell you all this for copyright reasons, but as distributed the fonts are in the public domain.
It's possible to resurrect the font table used by pre-2.0 versions of SM, using the index file `old_font_index'
This document was generated on 12 Febuary 1997 using the %M% translator version %I%.