-module(simple_if).
-export([login/2]).
login(UserName,Pwd) ->
if
UserName==udara , Pwd==123 ->
"Authenticated";
UserName==udara , Pwd /= 123 ->
"Password Error";
UserName /= udara , Pwd ==123 ->
"User Name Error";
true ->
"Authentication failed"
end.Labels: erlang, if, login
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home