home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 2 / RISC_DISC_2.iso / pd_share / program / language / scm / !Scm / docs / scm_doc < prev   
Encoding:
Text File  |  1994-06-19  |  9.5 KB  |  331 lines

  1.  
  2.  
  3.  
  4. SCM(19 Dec 1993)                                 SCM(19 Dec 1993)
  5.  
  6.  
  7. NAME
  8.        scm - a Scheme Language Interpreter
  9.  
  10. SYNOPSIS
  11.        scm  [-ibvqmu]  [-a kbytes ] [-p number ] [-c expression ]
  12.        [-e expression ] [-f filename ] [-l filename ] [-r feature
  13.        ] [-- | - | -s] [filename] [arguments ...]
  14.  
  15. DESCRIPTION
  16.        Scm is a Scheme interpreter.
  17.  
  18.        Upon  startup scm loads the file specified by by the envi-
  19.        ronment  variable  SCM_INIT_PATH  or  by   the   parameter
  20.        IMPLINIT in the makefile (or scmfig.h) if SCM_INIT_PATH is
  21.        not defined.  The makefiles attempt  to  set  IMPLINIT  to
  22.        "Init.scm" in the source directory.
  23.  
  24.        Unless  the  option  -no-init-file  occurs  in the command
  25.        line,  "Init.scm"  checks  to  see  if   there   is   file
  26.        "ScmInit.scm"  in  the  path  specified by the environment
  27.        variable HOME (or in the  current  directory  if  HOME  is
  28.        undefined).  If it finds such a file it is loaded.
  29.  
  30.        "Init.scm"  then looks for command input from one of three
  31.        sources: From an option on the command line, from  a  file
  32.        named on the command line, or from standard input.
  33.  
  34.  
  35. OPTIONS
  36.        The  options  are  processed in the order specified on the
  37.        command line.
  38.  
  39.        -akbytes
  40.             specifies that scm should allocate an  initial  heap-
  41.             size of kbytes.  This option, if present, must be the
  42.             first on the command line.  This option  is  not  yet
  43.             operational.
  44.  
  45.        -no-init-file
  46.             Inhibits  the  loading  of "ScmInit.scm" as described
  47.             above.
  48.  
  49.        -eexpression
  50.  
  51.        -cexpression
  52.             specifies that the scheme expression expressions to
  53.             be evaluated.  These options are inspired by perl and
  54.             sh respectively.  On Amiga systems the entire  option
  55.             and  argument  need  to  be  enclosed in qoutes.  For
  56.             instance "-e(newline)".
  57.  
  58.        -rfeature
  59.             requires feature.  This will load a file from SLIB if
  60.             that feature is not already supported.  If feature is
  61.  
  62.  
  63.  
  64.                                                                 1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SCM(19 Dec 1993)                                 SCM(19 Dec 1993)
  71.  
  72.  
  73.             2, 3, 4, or 5 scm will require the  features  necces-
  74.             sary  to  support R2RS, R3RS, R4RS, or proposed R5RS,
  75.             respectively.
  76.  
  77.        -lfilename
  78.  
  79.        -ffilename
  80.             loads filename.  Scm will load the first (unoptioned)
  81.             file  named on the command line if no -c, -e, -f, -l,
  82.             or -s option preceeds it.
  83.  
  84.        -plevel
  85.             sets the prolixity (verboseness) to level.   This  is
  86.             the same as the scm command (verobse level ).
  87.  
  88.        -v   (verbose mode) specifies that scm will print prompts,
  89.             evaluation  times,  notice  of  loading  files,   and
  90.             garbage  collection  statistics.  This is the same as
  91.             -p3.
  92.  
  93.        -q   (quiet mode) specifies that scm will print  no  extra
  94.             information.  This is the same as -p0.
  95.  
  96.        -m   specifies  that  subsequent  loads,  evaluations, and
  97.             user interactions will be with R4RS macro capability.
  98.             To use a specific R4RS macro implementation from SLIB
  99.             (instead  of  SLIB's  default)  put  -r  macropackage
  100.             before -m on the command line.
  101.  
  102.        -u   specifies  that  subsequent  loads,  evaluations, and
  103.             user interactions will be without R4RS macro capabil-
  104.             ity.  R4RS macro capability can be restored by a sub-
  105.             sequent -m on the command line or from Scheme code.
  106.  
  107.        -i   specifies that scm should  run  interactively.   That
  108.             means that scm will not terminate until the (quit) or
  109.             (exit) command is given, even if  there  are  errors.
  110.             It  also  sets the prolixity level to 2 if it is less
  111.             than 2.  This will print prompts,  evaluation  times,
  112.             and notice of loading files.  The prolixity level can
  113.             be set by subsequent options.  If scm is started from
  114.             a  tty,  it will assume that it should be interactive
  115.             unless given a subsequent -b option.
  116.  
  117.        -b   specifies  that  scm  should  run  non-interactively.
  118.             That  means  that scm will terminate after processing
  119.             the command line or if there are errors.
  120.  
  121.        -s   specifies, by analogy with sh, that  further  options
  122.             are to be treated as program aguments.
  123.  
  124.        -    --  specifies  that  there are no more options on the
  125.             command line.
  126.  
  127.  
  128.  
  129.  
  130.                                                                 2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. SCM(19 Dec 1993)                                 SCM(19 Dec 1993)
  137.  
  138.  
  139. ENVIRONMENT VARIABLES
  140.        SCM_INIT_PATH
  141.             is the pathname where scm will look for its  initial-
  142.             ization  code.  The default is the file "Init.scm" in
  143.             the source directory.
  144.  
  145.        SCHEME_LIBRARY_PATH
  146.             is the SLIB Scheme library directory.
  147.  
  148.        HOME is the directory where "Init.scm" will look  for  the
  149.             user initialization file "ScmInit.scm".
  150.  
  151. SCHEME VARIABLES
  152.        *argv*
  153.             contains  the  list  of  arguments  to  the  program.
  154.             *argv* can change during argument  processing.   This
  155.             list  is  suitable  for  use  as  an argument to SLIB
  156.             getopt.
  157.  
  158.        *R4RS-macro*
  159.             controls whether loading and interaction support R4RS
  160.             macros.  Define this in "ScmInit.scm" or files speci-
  161.             fied on the command line.  This can be overridden  by
  162.             subsequent -m and -u options.
  163.  
  164.        *interactive*
  165.             controls interactivity as explained for the -i and -b
  166.             options.  Define this in "ScmInit.scm" or files spec-
  167.             ified on the command line.  This can be overridden by
  168.             subsequent -i and -b options.
  169.  
  170. EXAMPLES
  171.        % scm foo.scm arg1 arg2 arg3
  172.             Load and execute the contents of foo.scm.  Parameters
  173.             arg1  arg2  and  arg3  are  stored in the global list
  174.             *argv*.
  175.  
  176.        % scm -f foo.scm arg1 arg2 arg3
  177.             The same.
  178.  
  179.        % scm -s foo.scm arg1 arg2
  180.             Set *argv* to ("foo.scm"  "arg1"  "arg2")  and  enter
  181.             interactive session.
  182.  
  183.        %  scm  -e  '(display "foo")(display (list-ref *argv*
  184.             *optind*))' bar
  185.             Print ``foobar''
  186.  
  187. FEATURES
  188.        Runs  under  Amiga, Atari-ST, MacOS, MS-DOS, OS/2, NOS/VE,
  189.        Unicos, VMS, Unix and similar systems.  Support for  ASCII
  190.        and EBCDIC character sets.
  191.  
  192.        Conforms  to  Revised^4 Report on the Algorithmic Language
  193.  
  194.  
  195.  
  196.                                                                 3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. SCM(19 Dec 1993)                                 SCM(19 Dec 1993)
  203.  
  204.  
  205.        Scheme and the IEEE P1178 specification.
  206.  
  207.        Support for SICP, R2RS, R3RS, and (proposed)  R5RS  scheme
  208.        code.
  209.  
  210.        Many Common Lisp functions: logand, logor, logxor, lognot,
  211.        ash,  logcount,  integer-length,  bit-extract,   defmacro,
  212.        macroexpand,  macroexpand1, gentemp, defvar, force-output,
  213.        software-type,  get-decoded-time,   get-internal-run-time,
  214.        get-internal-real-time,  delete-file,  rename-file,  copy-
  215.        tree, acons, and eval.
  216.  
  217.        Char-code-limit,   most-positive-fixnum,    most-negative-
  218.        fixnum,   and   internal-time-units-per-second  constants.
  219.        *Features* and *load-pathname* variables.
  220.  
  221.        Arrays and bit-vectors.  String ports and software  emula-
  222.        tion  ports.   I/O extensions providing most of ANSI C and
  223.        POSIX.1 facilities.
  224.  
  225.        User definable responses to interrupts  and  errors,  Pro-
  226.        cess-syncronization  primitives, String regular expression
  227.        matching, and the CURSES screen management package.
  228.  
  229.        Available add-on packages including an interactive  debug-
  230.        ger, database, X-window graphics, BGI graphics, Motif, and
  231.        Open-Windows packages.
  232.  
  233.        A compiler  (HOBBIT,  available  separately)  and  dynamic
  234.        linking of compiled modules.
  235.  
  236.        Setable   levels  of  monitoring  and  timing  information
  237.        printed interactively (the `verbose' function).   Restart,
  238.        quit, and exec.
  239.  
  240. FILES
  241.        code.doc
  242.               Documentation  on  the  internal representation and
  243.               how to extend or include scm in other programs.
  244.  
  245.        MANUAL
  246.               Documentation  of  SCM  extensions  (beyond  Scheme
  247.               standards).
  248.  
  249. AUTHOR
  250.        Aubrey Jaffer
  251.        (jaffer@ai.mit.edu)
  252.  
  253. BUGS
  254.        The -a option is not yet functional.
  255.  
  256. SEE ALSO
  257.        The  Scheme  specifications for details on specific proce-
  258.        dures (altorf.ai.mit.edu:archive/scheme-reports/) or
  259.  
  260.  
  261.  
  262.                                                                 4
  263.  
  264.  
  265.  
  266.  
  267.  
  268. SCM(19 Dec 1993)                                 SCM(19 Dec 1993)
  269.  
  270.  
  271.        IEEE Std 1178-1990,
  272.        IEEE Standard for the Scheme Programming Language,
  273.        Institute of Electrical and Electronic Engineers, Inc.,
  274.        New York, NY, 1991
  275.  
  276.        Brian Harvey and Matthew Wright
  277.        Simply Scheme: Introducing Computer Science_
  278.        MIT Press, 1994 ISBN 0-262-08226-8
  279.  
  280.        R. Kent Dybvig, The Scheme Programming Language,
  281.        Prentice-Hall Inc, Englewood Cliffs, New Jersey 07632, USA
  282.  
  283.        H. Abelson, G. J. Sussman, and J. Sussman,
  284.        Structure and Interpretation of Computer Programs,
  285.        The MIT Press, Cambridge, Massachusetts, USA
  286.  
  287.        Enhancements  in  scm not in the standards are detailed in
  288.        MANUAL in the source directory.
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.                                                                 5
  329.  
  330.  
  331.