


STk(1)                   USER COMMANDS                     STk(1)



_________________________________________________________________

NAME
     stk, snow - A Scheme interpreter using the Tk toolkit

SYNOPSIS
     stk [_o_p_t_i_o_n_s] [_a_r_g _a_r_g ...]

OPTIONS
     stk interpreter accepts several command-line  options  which
     may be abbreviated, as long as the abbreviation is unambigu-
     ous (e.g. -h, -he, -hel are three possibe abbreviations  for
     the -help option).


     -display _d_i_s_p_l_a_y
                    Display (and screen) on which to display win-
                    dow.

     -file _f_i_l_e_N_a_m_e Read commands from _f_i_l_e_N_a_m_e rather than stan-
                    dard  input.   The  last  element in _f_i_l_e_N_a_m_e
                    will be used as the title for the application
                    and name of its interpreter for send commands
                    (unless overridden by the -name option).

     -geometry _g_e_o_m_e_t_r_y
                    Initial geometry to use for window.

     -name _n_a_m_e     Use _n_a_m_e as the title to be displayed in  the
                    window,  and  as  the name of the interpreter
                    for send commands.

     -sync          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.

     -no-tk         Don't initialize the Tk toolkit

     -load _f_i_l_e_N_a_m_e Evaluate expressions  contained  in  _f_i_l_e_N_a_m_e
                    before   reading  expressions  from  standard
                    input.

     -image _f_i_l_e_N_a_m_e
                    Restore the state saved in  _f_i_l_e_N_a_m_e  by  the
                    _d_u_m_p  primitive  (note:  _d_u_m_p  works  only on
                    SunOS 4.1.x for now).

     -cells _n_u_m_b_e_r  Set the default size for the heap  to  _n_u_m_b_e_r
                    cells. The given number is also the amount of
                    cells used when extending the  heap.  Default
                    value is 20000.



1994/06                Last change: 2.1.5                       1






STk(1)                   USER COMMANDS                     STk(1)



     -help          Print a summary of the  command-line  options
                    and exit.
_________________________________________________________________


DESCRIPTION
     Stk is a Scheme R4RS  interpreter  which  provide  a  simple
     access  to  the X11 Tk toolkit. If the -no-tk option is pro-
     vided to the interpreter, Tk library is not initialized  and
     no  main  window  is  created.  If stk is invoked with no -f
     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.


     Snow is a _l_i_g_h_t version of the stk  interpreter  which  does
     not  provide  support  for  the Tk toolkit. This interpreter
     does not recognize the options  -display,  -geometry,  -sync
     and  -no-tk  which  are  meaningless without Tk. This inter-
     preter is called, rather than the  standard  one,  when  the
     shell DISPLAY variable is not initialized.


     If the -file option is provided to Tk, then stk reads Scheme
     forms  from the file named in the -file option.  These forms
     will normally create an interactive interface consisting  of
     one  or  more  widgets.  When the end of the command file is
     reached, stk will continue to respond to X events until  all
     windows have been deleted.


VARIABLES
     Following Scheme variables are set when Stk starts:

     *argc*         Contains a count of the number of  _a_r_g  argu-
                    ments  (0 if none), not including the options
                    described above.

     *argv*         Contains a Scheme list whose elements are the
                    _a_r_g  arguments  (not  including  the  options
                    described above), in order, or an empty  list
                    if there are no _a_r_g arguments.

     *program-name* Contains _f_i_l_e_N_a_m_e if it was specified.   Oth-
                    erwise,  contains  the  name by which stk was
                    invoked.



SCRIPT FILES




1994/06                Last change: 2.1.5                       2






STk(1)                   USER COMMANDS                     STk(1)



     If you create a STk script in a file whose first line is

          #!/usr/local/bin/stk -f
9     then you can invoke the script file directly from your shell
     if  you  mark  it  as executable.  This assumes that stk 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.


ENVIRONMENT VARIABLES
     stk uses two shell variables:

     _S_T_K__L_I_B_R_A_R_Y    This variable  indicates  where  the  library
                    files  are  located.  If this variable is not
                    set,  library  are  searched  in  a  standard
                    placed  defined  upon installation (generally
                    /_u_s_r/_l_o_c_a_l/_l_i_b/_s_t_k).

     _S_T_K__L_O_A_D__P_A_T_H  This  variable  serves  to   initialize   the
                    *_l_o_a_d-_p_a_t_h* Scheme variable. This variable is
                    a list of paths to try when in  a  load  com-
                    mand.  Default  value  of  this  variable  is
                    ".:$_S_T_K__L_I_B_R_A_R_Y"


FILES
     When stk starts running, it tries to load the file  _i_n_i_t._s_t_k
     in  the  following  places  (and  in  this order): _i_n_i_t._s_t_k,
     $_S_T_K__L_I_B_R_A_R_Y, the library directory defined at intallation.



KEYWORDS
     wish, toolkit
















9


1994/06                Last change: 2.1.5                       3



