underscore prefixed variables (was: Re: Noob - Getting Started Infinte Loop?)

Lennart Ohman lennart.ohman@REDACTED
Thu Aug 31 18:54:25 CEST 2006


Hi, it has been in the language as long as I can remember.
(That means from 1992 or something like that :-)
But if my memory doesn't serve me wrong, the debated semantics on
the more than just a single underscore changed somewhere. Probably
right after the book was published!?

Best Regards
Lennart

-------------------------------------------------------------
Lennart Ohman                   office  : +46-8-587 623 27
Sjoland & Thyselius Telecom AB  cellular: +46-70-552 67 35
Sehlstedtsgatan 6               fax     : +46-8-667 82 30
SE-115 28, STOCKHOLM, SWEDEN    email   : lennart.ohman@REDACTED

> -----Original Message-----
> From: owner-erlang-questions@REDACTED [mailto:owner-erlang-
> questions@REDACTED] On Behalf Of Simon Chappell
> Sent: Thursday, August 31, 2006 6:41 PM
> To: erlangquestions
> Subject: Re: underscore prefixed variables (was: Re: Noob - Getting
> Started Infinte Loop?)
> 
> On 8/31/06, Fredrik Thulin <ft@REDACTED> wrote:
> > On Thursday 31 August 2006 03:03, Håkan Stenholm wrote:
> > ...
> > > Note that _V is still a valid variablename, so the code below is
> > > valid:
> > >
> > >     foo(_V) ->
> > >         _V * 2.
> > >
> > >     a call to foo(42) would yield 84 in this case.
> 
> When did that get added to the language? I looked in my copy of
> "Concurrent Programming in Erlang, 2ed" and didn't find that. All I
> found was that variables must start with an upper-case letter.
> 
> Simon
> 
> --
> www.simonpeter.org





More information about the erlang-questions mailing list