- Where Developers Learn, Share, & Build Careers


Is there a specified area that we specify? Programmically?

For example:

  - record (my_record, {foo = 0, bar = 0}). Modify_record (record, field, value) - & gt; Record # my_record {field = value}   

so that any modify_record (#my_record {foo = 1}, bar, 42) , or, modify_record (Some_method_that_returns_a_my_record () can do something, foo, 3.14)

Errors like some such compilation I field is not an atom or The record is in my_record

I know that there are some examples how to convert to a propellist / but I was hoping something more straightforward.

If you pass field number (instead of field name) it is possible. Meaning of modify_record phone
  instead of  
  modify_record (MyRecord, # my_record.foo, 3.14)   

(MyRecord, foo, 3.14)

(# my_record.foo returns the number of Fu fields in the record). In that case your record may be recorded

  modify_record (r, fieldano, val) - & gt; Setelement (FieldNo, Research, Val)    

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -