[erlang-questions] Defining records using macros

Yash Ganthe yash_ganthe@REDACTED
Thu Jul 18 09:15:27 CEST 2013


-define(REC_DEFINE(Type),
                -record(Type, {
      id
      ,val
    }).       %% The . is an essential part of record definition
).  %% Complains with syntax error: syntax error before: ')'

My intention is to use a macro for defining records.
?REC_DEFINE(my_rec).

Is there an escape character that the preprocessor can be give for the dot?

Thanks,
Yash

DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130718/86a75303/attachment.htm>


More information about the erlang-questions mailing list