id | type | value |
| exception |
compile | string | compile unit ( | ) | Fail |
load | string | Load unit and any units it needs | Fail | |
loadOne | string | Load unit only |
| Fail |
printVal | 'a | Print value on stdOut |
|
|
printDepth | int ref | Limit printed data depth |
|
|
printLength | int ref | Limit printed list and vector length |
| |
quit | unit | Quit the interactive SML system |
| |
system | string | Execute operating system command |
| |
use | string | Include file in program |
|
|
verbose | bool ref | Permit feedbackfrom 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
|
| DBD |
|
| gcd.sml |
| Gp | |||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||
exercises |
| notes | HelloWorld.java HelloWorld.class | |||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ex1.tex ex2.tex
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 LATEX 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