stk/Help/stk.1.html

181 lines
7.4 KiB
HTML
Raw Normal View History

1996-09-27 06:29:02 -04:00
<HTML><HEAD><TITLE>4.0 - STk manual page</TITLE></HEAD>
<BODY bgcolor = white>
<H2><IMG ALIGN=BOTTOM SRC="./Img/ManPageWhite.gif"> stk, snow</H2>
<I>A Scheme interpreter using the Tk toolkit</I><P><IMG ALIGN=TOP SRC="./Img/line-red.gif">
<H3><A NAME="M2">SYNOPSIS</A></H3>
<B>stk</B> [<I>options</I>] [<I>arg arg ...</I>]<BR>
<B>snow</B> [<I>options</I>] [<I>arg arg ...</I>]<BR>
<H3><A NAME="M3">OPTIONS</A></H3>
<B>stk</B> interpreter accepts several command-line options which may
be abbreviated, as long as the abbreviation
is unambiguous (e.g. <B>-h</B>, <B>-he</B>, <B>-hel</B> are three possibe
abbreviations for the <B>-help</B> option).
<P>
<DL>
<DT><A NAME="M4"><B>-display </B><I>display</I></A><DD>
Display (and screen) on which to display window.
<P>
<DT><A NAME="M5"><B>-file </B><I>fileName</I></A><DD>
Read commands from <I>fileName</I> rather than standard input. The
last element in <I>fileName</I> will be used as the title for the
application and name of its interpreter for <B><A HREF="./send.n.html">send</A></B>
commands (unless overridden by the <B>-name</B> option\fR).
<P>
<DT><A NAME="M6"><B>-geometry </B><I>geometry</I></A><DD>
Initial geometry to use for window.
<P>
<DT><A NAME="M7"><B>-name </B><I>name</I></A><DD>
Use <I>name</I> as the title to be displayed in the window, and
as the name of the interpreter for <B><A HREF="./send.n.html">send</A></B> commands.
<P>
<DT><A NAME="M8"><B>-new-colormap</B></A><DD>
Specifies that the main window should have a new private colormap instead of
using the default colormap for the screen.
<P>
<DT><A NAME="M9"><B>-sync</B></A><DD>
Execute all X server commands synchronously, so that errors
are reported immediately. This will result in much slower
execution, but it is useful for debugging.
<P>
<DT><A NAME="M10"><B>-visual </B><I>visual</I></A><DD>
Specifies the visual to use for the window.<I>Visual</I> may be one of the following:
<I>best</I>, <I>directcolor</I>, <I>grayscale</I>, <I>greyscale</I>,
<I>pseudocolor</I>, <I>staticcolor</I>, <I>staticgray</I>,
<I>staticgrey</I>, <I>truecolor</I>, or <I>default</I>
<P>
<DT><A NAME="M11"><B>-no-tk</B></A><DD>
Don't initialize the Tk toolkit
<P>
<DT><A NAME="M12"><B>-load </B><I>fileName</I></A><DD>
Evaluate expressions contained in <I>fileName</I> before reading
expressions from standard input.
<P>
<DT><A NAME="M13"><B>-image </B><I>fileName</I></A><DD>
Restore the state saved in <I>fileName</I> by the <I>dump</I> primitive
(Note: For now, <I>dump</I> works only on SunOS 4.1.x, Linux 1.x (a.out format)
and FreeBSD).
<P>
<DT><A NAME="M14"><B>-cells </B><I>number</I></A><DD>
Set the default size for the heap to <I>number</I> cells. The given number is
also the amount of cells used when extending the heap. Default value is 20000.
<P>
<DT><A NAME="M15"><B>-interactive</B></A><DD>
Tell the interpreter that it is used interactively (even if it doesn't
think so).
<P>
<DT><A NAME="M16"><B>-help</B></A><DD>
Print a summary of the command-line options and exit.
<P>
<DT><A NAME="M17"><B>--</B></A><DD>
Pass all remaining arguments through to the script's <B>argv</B>
variable without interpreting them.
This provides a mechanism for passing arguments such as <B>-name</B>
to a script instead of having <B>wish</B> interpret them.
<P>
</DL>
<H3><A NAME="M18">DESCRIPTION</A></H3>
<B>Stk</B> is a Scheme R4RS interpreter which provide a simple access to the
X11 Tk toolkit. If the <B>-no-tk</B> option is provided to the interpreter,
the Tk library is not initialized and no main window is created. If
<B>stk</B> is invoked with no <B>-f</B> option then it reads Scheme
expressions interactively from standard input. It will continue processing
commands until all windows have been deleted or until end-of-file is
reached on standard input.
<P>
<B>Snow</B> is a <I>light</I> version of the <B>stk</B> interpreter which
does not provide support for the Tk toolkit. This interpreter does not
recognize the options <B>-display</B>, <B>-geometry</B>, <B>-sync</B>
<B>new-colormap</B>, <B>visual</B> and <B>-no-tk</B> which are meaningless
without Tk. This interpreter is called, rather than the standard one,
when the shell DISPLAY variable is not initialized.
<P>
If the <B>-file</B> option is provided to Tk, then <B>stk</B> reads Scheme
forms from the file named in the <B>-file</B> option. These
forms will normally create an interactive interface consisting
of one or more widgets. When the end of the command file is
reached, <B>stk</B> will continue to respond to X events until
all windows have been deleted.
<P>
The <B>-interactive</B> option forces the interpreter in interactive
mode. In this mode, standard output and standard error are unbuffered.
Use this option when you launch <B>stk</B> from <B>emacs</B>.
<H3><A NAME="M19">VARIABLES</A></H3>
Following Scheme variables are set when <B>Stk</B> starts:
<P>
<DL>
<DT><A NAME="M20"><B>*argc*</B></A><DD>
Contains a count of the number of <I>arg</I> arguments (0 if none),
not including the options described above.
<P>
<DT><A NAME="M21"><B>*argv*</B></A><DD>
Contains a Scheme list whose elements are the <I>arg</I> arguments (not
including the options described above), in order, or an empty list
if there are no <I>arg</I> arguments.
<P>
<DT><A NAME="M22"><B>*program-name*</B></A><DD>
Contains <I>fileName</I> if it was specified.
Otherwise, contains the name by which <B>stk</B> was invoked.
<P>
</DL>
<H3><A NAME="M23">SCRIPT FILES</A></H3>
If you create a STk script in a file whose first line is
<PRE><B>#!/usr/local/bin/stk -f</B></PRE>
then you can invoke the script file directly from your shell if
you mark it as executable.
This assumes that <B>stk</B> has been installed in the default
location in /usr/local/bin; if it's installed somewhere else
then you'll have to modify the above line to match.
<H3><A NAME="M24">ENVIRONMENT VARIABLES</A></H3>
<B>stk</B> uses the following shell variables:
<P>
<DL>
<DT><A NAME="M25"><I>STK_LIBRARY</I></A><DD>
This variable indicates where the library files are located. This variable
allows to overload the default value of the Scheme variable <I>*stk-library*</I>
which is automatically calculated by the interpreter.(i.e. <I>stk</I> or <I>snow</I>).
<P>
<DT><A NAME="M26"><I>STK_LOAD_PATH</I></A><DD>
This variable serves to initialize the <I>*load-path*</I> Scheme variable. This
variable is a list of paths to try when in a load command.
<P>
<DT><A NAME="M27"><I>STK_HELP_PATH</I></A><DD>
This variable serves to initialize the <I>*help-path*</I> Scheme variable. It
must contain a list of documentation directories. This variable is used by the help
procedure.
<P>
</DL>
<H3><A NAME="M28">FILES</A></H3>
<DL>
<DT><A NAME="M29"><I>./init.stk</I></A><DD>
<DT><A NAME="M30"><I>$STK_LIBRARY/STk/init.stk</I></A><DD>
When <B>stk</B> starts running, it tries to load the file <I>init.stk</I>
in the current directory. If this file is not present, it tries to load
this file in the <B>STk_LIBRARY</B> directory (the value of <B>STk_LIBRARY</B>
is automatically computed to be in a sibling directory of the interpreter
executable.
<P>
<DT><A NAME="M31"><I>~/.stkrc</I></A><DD>
Standard <I>init.stk</I> file tries to load the file <I>~/.stkrc</I>. This file
can be used to store function definitions or variables settings that you want
to be executed at each interpretater invocation.
<P>
</DL>
<H3><A NAME="M32">SEE ALSO</A></H3>
<B>wish(1)</B>
<P><IMG ALIGN=TOP SRC="./Img/line-red.gif">
<A HREF=./STk-hlp.html><IMG ALIGN=BOTTOM SRC="./Img/RefBookWhite.gif"> Back to the <B>STk</B> main page</A>
</BODY></HTML>