<div dir="ltr"><div>No.<br><br></div>Sergej<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 11, 2015 at 11:53 AM, Kirill Ratkin <span dir="ltr"><<a href="mailto:kvratkin@gmail.com" target="_blank">kvratkin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><font face="tahoma, sans-serif">Hi!</font><div><font face="tahoma, sans-serif"><br></font></div><div><font face="tahoma, sans-serif">I'm trying to get records fields at runtime.</font></div><div><span style="font-family:tahoma,sans-serif">If I have record 'test' and I can do:</span><br></div><div><span style="font-family:monospace,monospace">record_info(fields, test).</span><br></div><div><font face="tahoma, sans-serif"><br></font></div><div><font face="tahoma, sans-serif">But if I do:</font></div><div><font face="monospace, monospace">R = test,</font></div><div><font face="monospace, monospace">record_info(fields, R).</font></div><div><font face="tahoma, sans-serif"><br></font></div><div><font face="tahoma, sans-serif">I get error :</font></div><div><font face="monospace, monospace">* 1: illegal record info.</font></div><div><font face="tahoma, sans-serif"><br></font></div><div><font face="tahoma, sans-serif">Documentation says: <span style="color:rgb(0,0,0)">To each module using records, a pseudo function is added during compilation to obtain information about records.</span></font></div><div><span style="color:rgb(0,0,0)"><font face="tahoma, sans-serif"><br></font></span></div><div><span style="color:rgb(0,0,0)"><font face="tahoma, sans-serif">It seems it's really 'pseudo' function ....</font></span></div><div><span style="color:rgb(0,0,0)"><font face="tahoma, sans-serif"><br></font></span></div><div><span style="color:rgb(0,0,0)"><font face="tahoma, sans-serif">Is there alternative way to get record fields in runtime?</font></span></div></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>