[erlang-questions] One sample program want to know how it works

Robert Virding <>
Mon May 19 01:01:55 CEST 2008

2008/5/18 Zvi <>:

> what's confusing here is that, as a programmer, you expect following format
> for define preprocessor directive:
> -define(NAME, VALUE).
> Note the closing parenthesis ")" before the dot "."
> For strict preprocessor implementation I would expect, this sample to fail
> on sytax error. But it's not
> So, probably the real format for deine (or attributes in general) is,
> either:
> -define(NAME, VALUE).
> OR
> -define(NAME, VALUE .

Yes I was a bit lazy when writing epp and did not handle that error case.
:-) I suppose someone really should fix it. But it makes for good obfuscated

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080519/762d7126/attachment.html>

More information about the erlang-questions mailing list