Spring Switzerland GmbH 2000 manual File, directories and paths, Dbd

Page 8

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

Image 8
Contents Spring term Using Linux at the ITU data bars ContentsLogging Executing commands via the button-bar Windows and icons WindowPrinting Running Java programs Running SML programsEmacs editor with an SML program SML system functions File, directories and paths DBD*,+--./.!0-!1*$324504 Star OfficeSome useful Unix commands Online documentationChanging password Using filesUsing floppy-disks Creating and removing directoriesDesktop enviroments in the data bars Manipulation of text filesRedirection of input or output PipelinesMore about Linux KDE The K Desktop EnviromentWindowMaker Gnome GNu Object Model EnviromentDanish user groups Getting Linux on your own machine