Fwd: FW: [erlang-questions] atoms used as status info, 'constants' etc

Dave Pawson dave.pawson@REDACTED
Tue Aug 18 10:24:58 CEST 2009


Hi

2009/8/18 Mingyan Wang <mingyan.wang@REDACTED>:

>
> If you use atom, define the constants in a hrl file.
> E.g.
> -define(status_a,status_a).

As a macro?
then
>Include this hrl file in your erl file and then you can use this syntax ?status_a.
>E.g.
>case Status of
 >?status_a ->
>.....


I've only seen .hrl files used for records!
Makes sense though.

thanks for that.


regards





--
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk



-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk


More information about the erlang-questions mailing list