Records
From Erlang Community
(Difference between revisions)
| Revision as of 11:01, 15 July 2007 (edit) Bryan (Talk | contribs) (Added a very rudimentary page about records (since I didn't know how to use them, and there was no page about them on the wiki).) ← Previous diff |
Revision as of 11:08, 15 July 2007 (edit) (undo) Bryan (Talk | contribs) (Added a link to Erlang.org.) Next diff → |
||
| Line 16: | Line 16: | ||
| elementTwoTimesEight( #recordname{ element2 = T } ) -> T * 8. | elementTwoTimesEight( #recordname{ element2 = T } ) -> T * 8. | ||
| </code> | </code> | ||
| + | |||
| + | == More Information == | ||
| + | |||
| + | More information at [http://erlang.org/doc/getting_started/records_macros.html#5.3 http://erlang.org/doc/getting_started/records_macros.html#5.3]. | ||
Revision as of 11:08, 15 July 2007
Contents |
Defining Records
-record( recordname, { element1, element2, element3 } ).
|
Creating a Record
R = #recordname{ element1 = "One", element2 = 2, element3 = three }.
|
Matching a Record
elementTwoTimesEight( #recordname{ element2 = T } ) -> T * 8.
|
More Information
More information at http://erlang.org/doc/getting_started/records_macros.html#5.3.

Digg It
Del.icio.us
Reddit
Facebook
Stumble Upon
Technorati

