Syntax is throughing my understanding off.
Wed Sep 22 07:44:03 CEST 2004
Edward Ing wrote:
> I am new to Erlang and I am trying to learn to use it to manipulate XML.
> I am lookng into the source files and see this definition:
> '#text#'(Text) ->
> I cannot find any reference material to explain what this means, the
> Obviously it is defining a function, but what is how do you invoke this
> function? Is '#text#' some kind of macro substitution?
1 you call the function like an ordinary function:
(or F = '#text', F("a text"), etc.)
2 it is not a macro. (macros are accessed with '?' ,ie ?A_MACRO). what
is happening is the creation of an _atom_ . atoms are usually small
letters, numbers and '_', but they can be anything. you just have to
single quote (') them. eg 'This is an atom!'
More information about the erlang-questions