-module(helloworld).
-export([start/0]).
-record(person, {name = "", id}).
start() ->
P = #person{name = "John",id = 1},
P1 = P#person{name = "Dan"},
io:fwrite("~p~n",[P1#person.id]),
io:fwrite("~p~n",[P1#person.name]).
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/266331.html