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

Bengt Kleberg bengt.kleberg@REDACTED
Wed Aug 27 17:14:28 CEST 2008


Greetings,

Do you mean like this:

#foo.bar


bengt

On Wed, 2008-08-27 at 16:01 +0100, Joel Reymont 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




More information about the erlang-questions mailing list