c(3)

MODULE
c - Command Interface Module

DESCRIPTION

The c module enables users to enter the short form of some commonly used commands. These functions are are intended for interactive use in the Erlang shell.

EXPORTS

c(File) -> CompileResult

    This function is equivalent to:

    compile:file(File, [report_errors, error_summary])

c(File, Flags) -> CompileResult

    Types
        File = atom() | string()
        CompileResult = {ok, ModuleName} | error
        ModuleName = atom()
        Flags = [Flag]

    This function calls the following function and then purges and loads the code for the file:

    compile:file(File, Flags ++ [report_errors, error_summary])

    If the module corresponding to File is being interpreted, then int_compile:file is called with the same arguments and the module is loaded into the interpreter.

    Extreme care should be exercised when using this command to change running code which is executing. The expected result may not be obtained.

    Refer to compiler manual pages for a description of the individual compiler flags.

cd(Dir) -> void()

    Types
        Dir = atom() | string()

    This function changes the current working directory to Dir.

flush() -> void()

    This function flushes all messages in the shell message queue.

help() -> void()

    This function displays help about the shell and about the command interface module.

i() -> void()

    This function provides information about the current state of the system. This call uses the BIFs processes() and process_info/1 to examine the current state of the system. (The code is a good introduction to these two BIFs).

ni() -> void()

    This function does the same as i(), but for all nodes in the network.

i(X, Y, Z) -> void()

    Types
        X = Y = Z = int()

    This function evaluates process_info(pid(X, Y, Z)).

l(Module) -> void()

    Types
        Module = atom(), | string()

    This function evaluates code:purge(Module) followed bycode:load_module(Module). It reloads the module.

lc(ListOfFiles) -> Result

    Types
        ListOfFiles = [File]
        File = atom() | string()
        Result = [CompileResult]
        CompileResult = {ok, ModuleName} | error
        ModuleName = atom()

    This function compiles several files by calling c(File) for each file in ListOfFiles.

ls() -> void()

    This function lists all files in the current directory.

ls(Dir) -> void()

    Types
        Dir = atom() | string()

    This function lists all files in the directory Dir.

m() -> void()

    This function lists the modules which have been loaded and the files from which they have been loaded.

m(Module) -> void()

    Types
        Module = atom()

    This function lists information about Module.

nc(File) -> void()

    Types
        File = atom() | string()

    This function compiles File and loads it on all nodes in an Erlang nodes network.

nc(File, Flags) -> void()

    Types
        File = atom() | string()
        Flags = [Flag]

    This function compiles File with the additional compiler flags Flags and loads it on all nodes in an Erlang nodes network. Refer to the compile manual pages for a description of Flags.

nl(Module) -> void()

    Types
        Module = atom()

    This function loads Module on all nodes in an Erlang nodes network.

pid(X, Y, Z) -> pid()

    Types
        X = Y = Z = int()

    This function converts the integers X, Y, and Z to the Pid <X.Y.Z>. It saves typing and the use oflist_to_pid/1. This function should only be used when debugging.

pwd() -> void()

    This function prints the current working directory.

regs() -> void()

    This function displays formatted information about all registered processes in the system.

nregs() -> void()

    This function is the same as regs(), but on all nodes in the system.

AUTHORS
Joe Armstrong - joe@erix.ericsson.se.
Robert Virding - rv@erix.ericsson.se.
Claes Wikstrom - klacke@erix.ericsson.se