博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2013年6月26日

摘要: case Expression ofPattern1 [when Guard1] -> Expr_seq1;Pattern2 [when Guard2] -> Expr_seq2;…endif Guard1 -> ...; Guard2 -> ...; ...;end.Erlang 编程指南 第三章程顺序编程里有这么一个例子%%test1(X) ->%% if%% X > 1 -> greater;%% X smaller;%% true -> equal%% end.如果把 true 改成通配符行不行?%%test1(X) ->%% .. 阅读全文

posted @ 2013-06-26 12:52 bobolive 阅读(792) 评论(0) 推荐(0) 编辑