Skip to content

Files

Latest commit

 

History

History

harper-examples

Code Examples from Harpers' Book

Standard ML Directory harper-examples\ contains Standard ML code examples from Harper's book "Programming in Standard ML" (September 2011).
It also includes several build scripts (batch files, Make scripts) for experimenting with Standard ML on a Windows machine.

excs Example

This project has the following directory structure :

> tree /a /f .| findstr /v /b [A-Z]
|   build.bat
|   build.cm
\---src
        excs.sml
> build -verbose clean run
Delete directory "target"
Execute SML script "target\excs.sml" 1 a
Standard ML of New Jersey [Version 110.99.6.1; 32-bit; October 25, 2024]
[opening K:\harper-examples\excs\target\excs.sml]
[autoloading]
[library $SMLNJ-BASIS/basis.cm is stable]
[library $SMLNJ-BASIS/(basis.cm):basis-common.cm is stable]
[autoloading done]
Exceptions
 
Please enter an integer value: -1
Out of range.
Please enter an integer value: 2
2
Please enter an integer value: -1
Out of range.
Please enter an integer value: 2
2
Please enter an integer value: 33333
Overflow.
Please enter an integer value:
Done.

mics/March 2025