Spring Switzerland GmbH 2000 manual File, directories and paths,  !#!$&%

Models: 2000

1 14
Download 14 pages 22.57 Kb
Page 8
Image 8
7 File, directories and paths

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 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

Page 8
Image 8
Spring Switzerland GmbH 2000 manual File, directories and paths, !#!$&%