194 lines
8.1 KiB
HTML
194 lines
8.1 KiB
HTML
<HTML><HEAD><TITLE>January_1998 - STk manual page</TITLE></HEAD>
|
||
<BR>
|
||
<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-colormap BnewR}</A><DD>
|
||
Specifies that the window should have a new private colormap instead of
|
||
using the default colormap for the screen.
|
||
<P>
|
||
<DT><A NAME="M5">{B-display IdisplayR}</A><DD>
|
||
Display (and screen) on which to display window.
|
||
<P>
|
||
<DT><A NAME="M6">{B-file IfileNameR}</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="M7">{B-geometry IgeometryR}</A><DD>
|
||
Initial geometry to use for window.
|
||
<P>
|
||
<DT><A NAME="M8">{B-name InameR}</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="M9">{B-syncR}</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 IvisualR}</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-tkR}</A><DD>
|
||
Don't initialize the Tk toolkit
|
||
<P>
|
||
<DT><A NAME="M12">{B-load IfileNameR}</A><DD>
|
||
Evaluate expressions contained in <I>fileName</I> before reading
|
||
expressions from standard input.
|
||
<P>
|
||
<DT><A NAME="M13">{B-image IfileNameR}</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 InumberR}</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-interactiveR}</A><DD>
|
||
Tell the interpreter that it is used interactively (even if it doesn't
|
||
think so).
|
||
<P>
|
||
<DT><A NAME="M16">{B-helpR}</A><DD>
|
||
Print a summary of the command-line options and exit.
|
||
<P>
|
||
<DT><A NAME="M17">{B-|-R}</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>-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>
|
||
<B>Note:</B> The <B>-file</B> exits for compatibility reasons and can be
|
||
eventually ommited. In there is no <B>-file</B> option used, the first
|
||
argument in the command line is taken as the name of the script file
|
||
to execute. To launch an interactive script with an argument, you have
|
||
to use the <B>--</B> option.
|
||
<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> Contains <I>fileName</I> if it was provided (in a</A><DD>
|
||
<B>-file</B> option or as first argument of the command line).
|
||
Otherwise, contains the name by which the interpreter 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.
|
||
Note that <B>-f</B> which was necessary with pre-4.0 versions of <B>STk</B>
|
||
is no more necessary and can be omitted.
|
||
|
||
<H3><A NAME="M24">ENVIRONMENT VARIABLES</A></H3>
|
||
<B>stk</B> uses the following shell variables:
|
||
<P>
|
||
<DL>
|
||
<DT><A NAME="M25">{ISTK_LIBRARYR}</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">{ISTK_LOAD_PATHR}</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">{ISTK_HELP_PATHR}</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>
|
||
<DT><A NAME="M28">{ISTK_IMAGE_PATHR}</A><DD>
|
||
This variable serves to initialize the <I>*image-path*</I> Scheme variable. It
|
||
must contain a list of images directories. This variable is used by the make-image
|
||
procedure.
|
||
|
||
|
||
<P>
|
||
</DL>
|
||
<H3><A NAME="M29">FILES</A></H3>
|
||
<DL>
|
||
<DT><A NAME="M30">{I./init.stkR}</A><DD>
|
||
<DT><A NAME="M31">{I$STK_LIBRARY/STk/init.stkR}</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="M32">{I~/.stkrcR}</A><DD>
|
||
Standard <I>init.stk</I> file tries to load the file <I>~/.stkrc</I>. This file
|
||
can be used to store functions definitions or variables settings that you want
|
||
to be executed at each interpreter invocation.
|
||
|
||
<P>
|
||
</DL>
|
||
<H3><A NAME="M33">SEE ALSO</A></H3>
|
||
<B>wish(1)</B>
|
||
<P><IMG ALIGN=TOP SRC="./Img/line-red.gif"><P>
|
||
<A HREF=./STk-hlp.html><IMG ALIGN=BOTTOM SRC="./Img/RefBookWhite.gif"> Back to the <B>STk</B> main page</A>
|
||
</BODY></HTML>
|