[erlang-questions] One sample program want to know how it works
Sun May 18 12:52:03 CEST 2008
what's confusing here is that, as a programmer, you expect following format
for define preprocessor directive:
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,
-define(NAME, VALUE .
Then everything is works using substitution:
SUBSTITUTE: ?x => "x("
SUBSTITUTE: ?X => "X)\n->"
SUBSTITUTE: ?Xx => X
> ->. ?x?X?Xx.
> This is the program.I want to know how it works.
> Please anyone help me.
View this message in context: http://www.nabble.com/One-sample-program-want-to-know-how-it-works-tp17274934p17301499.html
Sent from the Erlang Questions mailing list archive at Nabble.com.
More information about the erlang-questions