【发布时间】:2011-01-10 15:48:46
【问题描述】:
这段代码有什么问题?
我在person.name 中期待"titi",但我仍然有"toto"!
更明确一点,如何修改函数中的记录?
init1()->
S=#person{name="toto"}, %record creation and field setting
fct(S),
io:format("~s~n",[S#person.name]).
fct(R)->
R#person{name="titi"}. %record updating
【问题讨论】: