Learning by reading code

Bengt Kleberg eleberg@REDACTED
Tue May 27 09:56:05 CEST 2003


> X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0
> content-class: urn:content-classes:message
> MIME-Version: 1.0
> Subject: Learning by reading code
> Date: Tue, 27 May 2003 09:46:47 +0200
> X-MS-Has-Attach: 
> X-MS-TNEF-Correlator: 
> Thread-Topic: Learning by reading code
> Thread-Index: AcMkJCBSuu5qysadRYmHgj4F1EFEKg==
> From: "WILLIAMS Dominic" <D.WILLIAMS@REDACTED>


> I am trying to learn Erlang, and like to read code written by experienced 
Erlangers.

this is one (very good) part of learning to program.


> I came across the following things (in xmerl) for which I could find no 
explanation in the documentation:
> 
> -compile(export_all).
> 
> What does this mean? Does it automatically export all functions contained in 
the file?
> 

you are correct.


> '#text'(Text) ->
>     export_text(Text).
> 
> There are lots of functions in xmerl with these funny names. Does this have 
any special significance?
> 

normal function names are written with [a-z] plus _ . if you want to
use special characters in a function name (like #) you have to single quoute
the name.



bengt




More information about the erlang-questions mailing list