Window User Manual

id type value exception
compile string -> unit compile unit ( ) Fail
load string -> unit Load unit and any units it needs Fail
loadOne string -> unit Load unit only Fail
printVal
’a -> ’a Print value on stdOut
printDepth int ref Limit printed data depth
printLength int ref Limit printed list and vector length
quit unit -> unit Quit the interactive SML system
system string -> unit Execute operating system command
use string -> unit Include file in program
verbose bool ref Permit feedback from compile
The entities printDepth, printLength, and verbose are set by an assignment, that is, the
assignment:
printLength := 100;
ensures that the response from SML will print the first 100 elements of a list.
7 File, directories and paths
nh
Gp
HelloWorld.java
HelloWorld.class
gcd.sml
DBD
exercises
ex1.tex ex2.tex
notes
Figure 5: Possible file organisation for a user nh
Files on disk are organised in directories. A directory may contain subdirectories which gives a tree
structure on the set of files. The private files for a user nh may be structured as shown in Figure 5.
This user has a home directory nh containing subdirectories Gp for the course “Grundlæggende Pro-
grammering” and DBD for files related to the course “Design af brugergrænseflader og data”. The
home directory contains furthermore a SML program gcd.sml, while the directory DBD contains a
subdirectory exercises which contains two L
A
T
E
X documents ex1.tex and ex2.tex, etc.
References to a file is made relative to the current directory. Hence, if DBD has been selected as the
current directory, then the file ex1.tex in the exercises subdirectory is specified by the path:
8