Nothingness

Robert Virding <>
Sat Oct 27 16:59:01 CEST 2001


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" <> 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}



More information about the erlang-questions mailing list