[erlang-questions] Use of records
Christian S
chsu79@REDACTED
Thu Nov 9 16:14:10 CET 2006
Record1 = Record#gurka{foo=bar} will create a new gurka record
bound to the variable called Record1, but foo set to bar.
The old one still exists. Record1 gets all values from Record, except
those values changed between curly brackets (foo=bar in my example).
I'm not sure what your next questions are about. If you want to use this module
in other modules you either include the .hrl or implement and export
functions to access the record. Such as:
Record1 = vegetables:gurka_foo(Record, bar)
bar = vegetables:gurka_foo(Record)
On 11/9/06, selva rani <ranitrue@REDACTED> wrote:
> I have a doubt while using records...
> Is record field values are being updated using the same variable?
> If i assigned some values in one module and want to change a few fields in
> the record, should i pass the variable name to other module where i want to
> put a new value? Or is there any other way of handling it?
More information about the erlang-questions
mailing list