8.7 Internal Representation of Records
Record expressions are translated to tuple expressions during compilation. A record defined as
-record(Name, {Field1,...,FieldN}).
is internally represented by the tuple
{Name,Value1,...,ValueN}
where each ValueI is the default value for FieldI.
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.
分享到:
相关推荐
**Representation of Arrays, Records, and Sets**: This section discusses the internal representation of these data structures in memory, including how they are accessed and manipulated. - **...
You can redirect all of the output of your scripts to a function. For ; example, if you set output_handler to "mb_output_handler", character ; encoding will be transparently converted to the ...
Table of Contents Summary of gdb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Free Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....
Table of Contents Summary of gdb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Free Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....
Table of Contents Summary of gdb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Free software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....