stk/Help/stk.1.html

197 lines
8.2 KiB
HTML
Raw Normal View History

1998-04-10 06:59:06 -04:00
<HTML><HEAD><TITLE>January_1998 - STk manual page</TITLE></HEAD>
<BR>
1996-09-27 06:29:02 -04:00
<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>
1998-09-30 07:11:02 -04:00
<DT><A NAME="M4">{ B-colormap Bnew R}</A><DD>
1998-04-10 06:59:06 -04:00
Specifies that the window should have a new private colormap instead of
using the default colormap for the screen.
<P>
1998-09-30 07:11:02 -04:00
<DT><A NAME="M5">{ B-display Idisplay R}</A><DD>
1996-09-27 06:29:02 -04:00
Display (and screen) on which to display window.
<P>
1998-09-30 07:11:02 -04:00
<DT><A NAME="M6">{ B-file IfileName R}</A><DD>
1996-09-27 06:29:02 -04:00
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>
1998-09-30 07:11:02 -04:00
<DT><A NAME="M7">{ B-geometry Igeometry R}</A><DD>
1996-09-27 06:29:02 -04:00
Initial geometry to use for window.
<P>
1998-09-30 07:11:02 -04:00
<DT><A NAME="M8">{ B-name Iname R}</A><DD>
1996-09-27 06:29:02 -04:00
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>
1998-09-30 07:11:02 -04:00
<DT><A NAME="M9">{ B-sync R}</A><DD>
1996-09-27 06:29:02 -04:00
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>
1998-09-30 07:11:02 -04:00
<DT><A NAME="M10">{ B-visual Ivisual R}</A><DD>
1996-09-27 06:29:02 -04:00
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>
1998-09-30 07:11:02 -04:00
<DT><A NAME="M11">{ B-no-tk R}</A><DD>
1996-09-27 06:29:02 -04:00
Don't initialize the Tk toolkit
<P>
1998-09-30 07:11:02 -04:00
<DT><A NAME="M12">{ B-load IfileName R}</A><DD>
1996-09-27 06:29:02 -04:00
Evaluate expressions contained in <I>fileName</I> before reading
expressions from standard input.
<P>
1998-09-30 07:11:02 -04:00
<DT><A NAME="M13">{ B-image IfileName R}</A><DD>
1996-09-27 06:29:02 -04:00
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>
1998-09-30 07:11:02 -04:00
<DT><A NAME="M14">{ B-cells Inumber R}</A><DD>
1996-09-27 06:29:02 -04:00
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>
1998-09-30 07:11:02 -04:00
<DT><A NAME="M15">{ B-interactive R}</A><DD>
1996-09-27 06:29:02 -04:00
Tell the interpreter that it is used interactively (even if it doesn't
1999-09-05 07:16:41 -04:00
think so).
1996-09-27 06:29:02 -04:00
<P>
1998-09-30 07:11:02 -04:00
<DT><A NAME="M16">{ B-help R}</A><DD>
1999-09-05 07:16:41 -04:00
Print the version of the system and abort execution.
<P>
<DT><A NAME="M17">{ B-help R}</A><DD>
1996-09-27 06:29:02 -04:00
Print a summary of the command-line options and exit.
<P>
1999-09-05 07:16:41 -04:00
<DT><A NAME="M18">{ B-|- R}</A><DD>
1996-09-27 06:29:02 -04:00
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>
1999-09-05 07:16:41 -04:00
<H3><A NAME="M19">DESCRIPTION</A></H3>
1996-09-27 06:29:02 -04:00
<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>
1998-04-10 06:59:06 -04:00
<B>-colormap</B>, <B>-visual</B> and <B>-no-tk</B> which are meaningless
1996-09-27 06:29:02 -04:00
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.
1998-04-10 06:59:06 -04:00
<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.
1996-09-27 06:29:02 -04:00
<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>.
1999-09-05 07:16:41 -04:00
<H3><A NAME="M20">VARIABLES</A></H3>
1996-09-27 06:29:02 -04:00
Following Scheme variables are set when <B>Stk</B> starts:
<P>
<DL>
1999-09-05 07:16:41 -04:00
<DT><A NAME="M21"><B>*argc*</B></A><DD>
1996-09-27 06:29:02 -04:00
Contains a count of the number of <I>arg</I> arguments (0 if none),
not including the options described above.
<P>
1999-09-05 07:16:41 -04:00
<DT><A NAME="M22"><B>*argv*</B></A><DD>
1996-09-27 06:29:02 -04:00
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>
1999-09-05 07:16:41 -04:00
<DT><A NAME="M23"><B>*program-name*</B> Contains <I>fileName</I> if it was provided (in a</A><DD>
1998-04-10 06:59:06 -04:00
<B>-file</B> option or as first argument of the command line).
Otherwise, contains the name by which the interpreter was invoked.
1996-09-27 06:29:02 -04:00
<P>
</DL>
1999-09-05 07:16:41 -04:00
<H3><A NAME="M24">SCRIPT FILES</A></H3>
1996-09-27 06:29:02 -04:00
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.
1998-04-10 06:59:06 -04:00
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.
1996-09-27 06:29:02 -04:00
1999-09-05 07:16:41 -04:00
<H3><A NAME="M25">ENVIRONMENT VARIABLES</A></H3>
1996-09-27 06:29:02 -04:00
<B>stk</B> uses the following shell variables:
<P>
<DL>
1999-09-05 07:16:41 -04:00
<DT><A NAME="M26">{ ISTK_LIBRARY R}</A><DD>
1996-09-27 06:29:02 -04:00
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>
1999-09-05 07:16:41 -04:00
<DT><A NAME="M27">{ ISTK_LOAD_PATH R}</A><DD>
1996-09-27 06:29:02 -04:00
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>
1999-09-05 07:16:41 -04:00
<DT><A NAME="M28">{ ISTK_HELP_PATH R}</A><DD>
1996-09-27 06:29:02 -04:00
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.
1998-04-30 07:04:33 -04:00
<P>
1999-09-05 07:16:41 -04:00
<DT><A NAME="M29">{ ISTK_IMAGE_PATH R}</A><DD>
1998-04-30 07:04:33 -04:00
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.
1996-09-27 06:29:02 -04:00
<P>
</DL>
1999-09-05 07:16:41 -04:00
<H3><A NAME="M30">FILES</A></H3>
1996-09-27 06:29:02 -04:00
<DL>
1999-09-05 07:16:41 -04:00
<DT><A NAME="M31">{ I./init.stk R}</A><DD>
<DT><A NAME="M32">{ I$STK_LIBRARY/STk/init.stk R}</A><DD>
1996-09-27 06:29:02 -04:00
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>
1999-09-05 07:16:41 -04:00
<DT><A NAME="M33">{ I~/.stkrc R}</A><DD>
1996-09-27 06:29:02 -04:00
Standard <I>init.stk</I> file tries to load the file <I>~/.stkrc</I>. This file
1998-04-10 06:59:06 -04:00
can be used to store functions definitions or variables settings that you want
to be executed at each interpreter invocation.
1996-09-27 06:29:02 -04:00
<P>
</DL>
1999-09-05 07:16:41 -04:00
<H3><A NAME="M34">SEE ALSO</A></H3>
1996-09-27 06:29:02 -04:00
<B>wish(1)</B>
1998-04-10 06:59:06 -04:00
<P><IMG ALIGN=TOP SRC="./Img/line-red.gif"><P>
1996-09-27 06:29:02 -04:00
<A HREF=./STk-hlp.html><IMG ALIGN=BOTTOM SRC="./Img/RefBookWhite.gif"> Back to the <B>STk</B> main page</A>
</BODY></HTML>