CS 3304 Standard ML Resources

SUGGESTED STEPS FOR GETTING SML

  1. Follow the link SML Home Page

  2. Scroll down to the section "Downloading SML/NJ Software for Unix or Windows"

  3. Find the second bullet point "A self-installing .EXE for Windows 9X, NT, or 2000 is available (http, ftp; 5.4MB)." Click on ftp . Save 'smlnj.exe' to a temporary folder (C:\Temp).

  4. Execute smlnj.exe in the folder "c:\temp"

  5. Follow the default options (choosing typical installation), SML installs in the folder c:\sml

  6. Choose to restart the machine after installation.

  7. Download 'Paragraph Measurer' para.sml in the folder "c:\temp"

  8. Traverse to folder c:\sml\bin and launch sml.bat

  9. At the SML prompt '-' (hyphen), type in
    - use "c:\\temp\\para.sml";
    Please include the file name in double quotes.

  10. You will receive a stream of output messages indicating compilation, they have the following lines in the end
    functor Paragraphs : 
    signature PARAGRAPH_MEASURER = sig val process_paragraph :
    			TextIO.instream * TextIO.outstream -> unit end
    functor Paragraph_Measurer : 
    structure Line_Module : LINES
    structure Paragraph_Module : PARAGRAPHS
    structure Main : PARAGRAPH_MEASURER
    		

  11. You can then type in a line
    this is a test input to check if SML is installed correctly.
    Note: you will need to press enter (return key) twice after typing the line.

  12. You should get the following output
    this is a test input to check if SML is installed correctly.
    
    12 total words, average word size = 4.08333333333
    val it = () : unit
    val it = () : unit
    -
    installtion is now successful.

  13. Type
    - OS.Process.exit(OS.Process.success);
    to exit.

  14. Send email to heath@cs.vt.edu if you find errors in this procedure or if you have serious difficulty installing SML by this procedure. You may prefer to see the instructor or the GTA during office hours.


USEFUL LINKS FOR STANDARD ML


THESE SAMPLE PROGRAMS ARE PROVIDED FOR YOUR CONVENIENCE IN TESTING YOUR INSTALLATION OF STANDARD ML

Sample Programs
LanguageName File
Standard MLecho_input echo_input.sml
Standard ML Paragraph Measurer para.sml
                                                                                                                                                                 

copyright © 2001 Virginia Tech, ALL RIGHTS RESERVED
Last modified: April 23, 2001, 15:38:59 EDT, by Stephen H. Edwards <edwards@cs.vt.edu>