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