Next Previous Up Top Contents Index

3.5 Using the libraries in your applications: an example

3.5.1 The application

The application is a trivial program which reads a line of input and then prints it out prefixed by "The output is: ".

fun get_value () = TextIO.inputLine TextIO.stdIn;

fun show_value x = TextIO.output (TextIO.stdOut, x);

fun run () = let val v = get_value() val s = String.concat ["The output is: ", v] in show_value s end;

As you can see, this program uses the TextIO and String structures from the Basis library.


MLWorks User Guide version 2.0 for UNIX/Linux - 31 Jul 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker