[erlang-questions] Field name to tuple element number at compile time
Joseph Wayne Norton
norton@REDACTED
Wed Aug 27 17:14:08 CEST 2008
Joel -
The following should work:
#foo.bar
- Joe N.
On Thu, 28 Aug 2008 00:01:00 +0900, Joel Reymont <joelr1@REDACTED> wrote:
> Suppose I have -record(foo, { bar, baz }). I understand that I can do
> record_info(fields, foo) and get a list of fields at compile time.
>
> Is there a way to translate bar into 2 at compile time as well?
>
> Thanks, Joel
>
> --
> wagerlabs.com
>
>
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
--
norton@REDACTED
More information about the erlang-questions
mailing list