码迷,mamicode.com
首页 > 其他好文 > 详细

学习:record用法

时间:2014-05-07 21:17:40      阅读:362      评论:0      收藏:0      [点我收藏+]

标签:style   class   code   ext   color   width   

详情请参考官网:http://www.erlang.org/doc/reference_manual/records.html

http://www.erlang.org/doc/programming_examples/records.html

 

1. record本质上是tuple.

2.获取record的结构相关的信息的函数:

To each module using records, a pseudo function is added during compilation to obtain information about records:

record_info(fields, Record) -> [Field]
record_info(size, Record) -> Size

Size is the size of the tuple representation, that is one more than the number of fields.

In addition, #Record.Name returns the index in the tuple representation of Name of the record Record. Name must be an atom.

学习:record用法,布布扣,bubuko.com

学习:record用法

标签:style   class   code   ext   color   width   

原文地址:http://www.cnblogs.com/ribavnu/p/3714131.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!