摘要:
1> list_to_binary(["select * from aa limit","1",",","97"]).>2> list_to_binary(["select * from aa limit",integer_to_list(1),",","97"]).>3> list_to_binary(["select * from aa limit",1,"97"]). >不理 阅读全文
摘要:
一、 concat(Things) -> string() Types: Things = [Thing] Thing = atom() | integer() | float() | string() Concatenates the text representation of the elements of Things. The elements of Things can be atoms, integers, floats or strings. > lists:concat([doc, '/', file, '.', 3]). &quo 阅读全文
摘要:
一、模块内调用1> AA=fun(BB)-> io:format("this is test args ~s~n",[BB]) end.#Fun2> AA(aa).this is test argsaaok3> BB=fun()-> io:format("this is BB FUN ~n",[]) end. #Fun4> BB().this is BB FUN ok5> spawn( BB). this is BB FUN 6> spawn(fun()-> AA(cc) end).this is t 阅读全文
摘要:
转自:https://erlangcentral.org/wiki/index.php/Building_a_Non-blocking_TCP_server_using_OTP_principlesBuilding a Non-blocking TCP server using OTP principlesFrom ErlangCentral WikiContents1 Author2 Overview3 Server Design4 Application and Supervisor behaviours5 Listener Process6 Client Socket Handling 阅读全文