September 2013
Intermediate to advanced
548 pages
12h 25m
English
Once we’ve built the boot script, we can turn our attention to
the programs that we’ll run inside SEE. All our examples are normal
Erlang modules that must export the function main().
The simplest of all programs is see_test1.
| see/see_test1.erl | |
| | -module(see_test1). |
| | -export([main/0]). |
| | main() -> |
| | see:write("HELLO WORLD\n"), |
| | see:write(integer_to_list(see:modules_loaded()-8) ++ " modules loaded\n"). |
To run this, we first compile see_test1 using the
standard compiler in the Erlang development environment. Once we have done
this, then we can run our program.
| | $ erlc see_test1.erl |
| | $ ./see see_test1 |
| | Hello world |
We can time this as follows:
| | $ time ./see see_test1 |
| | HELLO WORLD |
| | |
| | 4 modules ... |
Read now
Unlock full access