Nothingness
Erik Pearson
erik@REDACTED
Sat Oct 27 17:49:19 CEST 2001
The only indexed reference I found to "undefined" is on page 47 of the
spec, which is in reference to "LIA-1 functions", and not at all in the
book (concurrent programming...). It is however fully documented for the
case of records in the text of the "extensions since 4.4" document.
Erik.
--On Saturday, October 27, 2001 4:59 PM +0200 Robert Virding
<rv@REDACTED> wrote:
> I am pretty sure that in the manual it explicity states that the value
> of a record field which is not given a value when the record is
> created and does not have an explicit default value will have the value
> of the atom 'undefined'.
>
> Or least it should because this is what happens.
>
> Robert
>
> "Vance Shipley" <vances@REDACTED> writes:
>>>
>>> Interestingly, records do support the concept of "undefined" ...
>>>
>>> Erik.
>>
>> -module(undef).
>> -export([test/0]).
>>
>> -record(r1, {name, phone, address}).
>>
>> test() ->
>> # r1{name = "Joe", phone="5551234"}.
>>
>>
>> Erlang (BEAM) emulator version 5.1 [threads:0]
>>
>> Eshell V5.1 (abort with ^G)
>> 1> c(undef).
>> {ok,undef}
>> 2> undef:test().
>> {r1,"Joe","5551234",undefined}
Erik Pearson
@ Adaptations
email : erik@REDACTED
voice/fax : +1 510 527 5437
text page : page.erik@REDACTED
More information about the erlang-questions
mailing list