[erlang-questions] Record information
Wed Sep 20 11:38:17 CEST 2006
(Sorry about top-posting, I'm trying out Yahoo's new mail system)
When debugging, try rr and friends.
Records disappear at compile-time, but have a look at record_info/2 as a tool for rolling your own. (E.g., good old record_info(fields, my_rec) is expanded to a list of the field names of my_rec.)
(The preferrable approach would be to make records into first-class entities, but Erlang is locked into the "records = tuples" representation.)
----- Original Message ----
From: Dmitrii Dimandt <>
To: erlang-questions <>
Sent: Wednesday, September 20, 2006 9:46:35 AM
Subject: [erlang-questions] Record information
Is there a way to find information on a record? That is, what fields it contains, etc.?
That is, if I have a record like this:
And I have A = #forumRequest(userName = "login", password = "pass").
I can find out the name of the record by doing element(1, A). Can I find out that "login" is a userName and "pass" is password?
erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions