42
42
-spec help() -> 'ok'.
45
format("bt(Pid) -- stack backtrace for a process\n"
46
"c(File) -- compile and load code in <File>\n"
47
"cd(Dir) -- change working directory\n"
48
"flush() -- flush any messages sent to the shell\n"
49
"help() -- help info\n"
50
"i() -- information about the system\n"
51
"ni() -- information about the networked system\n"
52
"i(X,Y,Z) -- information about pid <X,Y,Z>\n"
53
"l(Module) -- load or reload module\n"
54
"lc([File]) -- compile a list of Erlang modules\n"
55
"ls() -- list files in the current directory\n"
56
"ls(Dir) -- list files in directory <Dir>\n"
57
"m() -- which modules are loaded\n"
58
"m(Mod) -- information about module <Mod>\n"
59
"memory() -- memory allocation information\n"
60
"memory(T) -- memory allocation information of type <T>\n"
61
"nc(File) -- compile and load code in <File> on all nodes\n"
62
"nl(Module) -- load module on all nodes\n"
63
"pid(X,Y,Z) -- convert X,Y,Z to a Pid\n"
64
"pwd() -- print working directory\n"
65
"q() -- quit - shorthand for init:stop()\n"
66
"regs() -- information about registered processes\n"
67
"nregs() -- information about all registered processes\n"
68
"xm(M) -- cross reference check a module\n"
69
"y(File) -- generate a Yecc parser\n").
45
io:put_chars(<<"bt(Pid) -- stack backtrace for a process\n"
46
"c(File) -- compile and load code in <File>\n"
47
"cd(Dir) -- change working directory\n"
48
"flush() -- flush any messages sent to the shell\n"
49
"help() -- help info\n"
50
"i() -- information about the system\n"
51
"ni() -- information about the networked system\n"
52
"i(X,Y,Z) -- information about pid <X,Y,Z>\n"
53
"l(Module) -- load or reload module\n"
54
"lc([File]) -- compile a list of Erlang modules\n"
55
"ls() -- list files in the current directory\n"
56
"ls(Dir) -- list files in directory <Dir>\n"
57
"m() -- which modules are loaded\n"
58
"m(Mod) -- information about module <Mod>\n"
59
"memory() -- memory allocation information\n"
60
"memory(T) -- memory allocation information of type <T>\n"
61
"nc(File) -- compile and load code in <File> on all nodes\n"
62
"nl(Module) -- load module on all nodes\n"
63
"pid(X,Y,Z) -- convert X,Y,Z to a Pid\n"
64
"pwd() -- print working directory\n"
65
"q() -- quit - shorthand for init:stop()\n"
66
"regs() -- information about registered processes\n"
67
"nregs() -- information about all registered processes\n"
68
"xm(M) -- cross reference check a module\n"
69
"y(File) -- generate a Yecc parser\n">>).
72
72
%% Compile a file/module.
74
-spec c(file:name()) -> {'ok', module()} | 'error'.
74
-spec c(File) -> {'ok', Module} | 'error' when
76
78
c(File) -> c(File, []).
78
-spec c(file:name(), [compile:option()]) -> {'ok', module()} | 'error'.
80
-spec c(File, Options) -> {'ok', Module} | 'error' when
82
Options :: [compile:option()],
80
85
c(File, Opts0) when is_list(Opts0) ->
81
86
Opts = [report_errors,report_warnings|Opts0],
208
-spec nc(file:name()) -> {'ok', module()} | 'error'.
214
-spec nc(File) -> {'ok', Module} | 'error' when
210
218
nc(File) -> nc(File, []).
212
-spec nc(file:name(), [compile:option()] | compile:option()) ->
213
{'ok', module} | 'error'.
220
-spec nc(File, Options) -> {'ok', Module} | 'error' when
222
Options :: [Option] | Option,
223
Option:: compile:option(),
215
226
nc(File, Opts0) when is_list(Opts0) ->
216
227
Opts = Opts0 ++ [report_errors, report_warnings],
399
-spec pid(non_neg_integer(), non_neg_integer(), non_neg_integer()) -> pid().
413
-spec pid(X, Y, Z) -> pid() when
414
X :: non_neg_integer(),
415
Y :: non_neg_integer(),
416
Z :: non_neg_integer().
402
419
list_to_pid("<" ++ integer_to_list(X) ++ "." ++
403
420
integer_to_list(Y) ++ "." ++
404
421
integer_to_list(Z) ++ ">").
406
-spec i(non_neg_integer(), non_neg_integer(), non_neg_integer()) ->
423
-spec i(X, Y, Z) -> [{atom(), term()}] when
424
X :: non_neg_integer(),
425
Y :: non_neg_integer(),
426
Z :: non_neg_integer().
409
428
i(X, Y, Z) -> pinfo(pid(X, Y, Z)).
732
-spec memory() -> [{atom(), non_neg_integer()}].
755
-spec memory() -> [{Type, Size}] when
757
Size :: non_neg_integer().
734
759
memory() -> erlang:memory().
736
-spec memory(atom()) -> non_neg_integer()
737
; ([atom()]) -> [{atom(), non_neg_integer()}].
761
-spec memory(Type) -> Size when
763
Size :: non_neg_integer()
764
; (Types) -> [{Type, Size}] when
767
Size :: non_neg_integer().
739
769
memory(TypeSpec) -> erlang:memory(TypeSpec).