[erlang-questions] Field name to tuple element number at compile time

Joel Reymont joelr1@REDACTED
Wed Aug 27 17:01:00 CEST 2008

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


More information about the erlang-questions mailing list