how to reassign or increment a variable in erlang
Chandrashekhar Mullaparthi
Chandrashekhar.Mullaparthi@REDACTED
Thu Nov 14 14:00:48 CET 2002
-record(counter_table, {name, value=0}).
mnesia:create_table(counter_table, [{attributes, record_info(fields,
counter_table)},
{disc_copies,
[sevas_db@REDACTED]}]).
(sevas_db@REDACTED)96> mnesia:dirty_read({counter_table, test}).
[{counter_table,test,0}]
(sevas_db@REDACTED)97>
(sevas_db@REDACTED)97> mnesia:dirty_update_counter({counter_table, test}, 1).
1
(sevas_db@REDACTED)98>
(sevas_db@REDACTED)98> mnesia:dirty_read({counter_table, test}).
[{counter_table,test,1}]
Chandru
-----Original Message-----
From: Suresh S [mailto:sureshsaragadam@REDACTED]
Sent: 14 November 2002 12:07
To: Chandrashekhar Mullaparthi
Cc: erlang-questions@REDACTED
Subject: RE: how to reassign or increment a variable in erlang
hi chandu
can u please give an example done on this ,
increment an attribute in mnesia table ,
thanking u
NOTICE AND DISCLAIMER:
This email (including attachments) is confidential. If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents. We cannot accept liability for any breaches of
confidence arising through use of email. Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions. We will not accept responsibility for any commitments
made by our employees outside the scope of our business. We do not warrant
the accuracy or completeness of such information.
More information about the erlang-questions
mailing list