if condition1 -> statement#1; condition2 -> statement#2; conditionN -> statement#N; true -> defaultstatement end.
-module(helloworld). -export([start/0]). start() -> A = 5, B = 6, if A == B -> io:fwrite("A is equal to B"); A < B -> io:fwrite("A is less than B"); true -> io:fwrite("False") end.
符号 ";" 需要在 statement#1 语句之后
-> 运算符需要在 true 表达式之后
A is less than B