Showing posts with label conditional statements. Show all posts
Showing posts with label conditional statements. Show all posts

Jan 3, 2007

Basic #9, If statements

Various ways of executing the if statement

if(expr)
if(expr) {block}
if(expr) {block} else {block}
if(expr) {block} elsif (expr) {block} ...
if(expr) {block} elsif (expr) {block} ... else {block}

(expression) ? (statement if true) : (statement if false)

unless (expr)