erlang - Erl 中的记录(Erlang 问题)

标签 erlang mnesia erl

有没有办法直接在erl中使用记录?不管我怎么尝试,它总是说找不到记录。我正在尝试进行 mnesia 交易,如果没有我的记录,我就无法走得太远。非常感谢任何帮助 - 谢谢!

最佳答案

是的,使用 help() 并在 shell 中找到这些命令。

rd(R,D)    -- define a record
rf()       -- remove all record information
rf(R)      -- remove record information about R
rl()       -- display all record information
rl(R)      -- display record information about R
rp(Term)   -- display Term using the shell's record information
rr(File)   -- read record information from File (wildcards allowed)
rr(F,R)    -- read selected record information from file(s)
rr(F,R,O)  -- read selected record information with options

这些是 shell 中的一个巧妙的 hack,它们允许您在编译模块时加载模块中使用的记录定义。使用 rr 命令从模块加载它。

请记住,这些仅可供交互式 shell 使用。

关于erlang - Erl 中的记录(Erlang 问题),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1386211/

相关文章:

crash - ejabberd不起作用,因为erl.exe总是崩溃

列表被长度函数设想为整数

erlang - 如何使用rpc :pmap correctly?

architecture - MNesia 是否支持断线操作后的同步?

linux - 使操作系统为 Erlang 提供更多内存访问

Erlang escript : exception error: no match of right hand side value {error, enoent}‏

sockets - Erlang:连接到服务器,并在同一个套接字上接收输入

erlang - 如何将远程pid转换为节点名称?

Erlang 的 99.9999999%(九个九)可靠性

erlang - Mnesia:根据涉及多个索引列的条件选择行时如何正确使用索引操作