Skip to content

Latest commit

 

History

History
55 lines (46 loc) · 1.51 KB

README-FlowControl-Conditions2.md

File metadata and controls

55 lines (46 loc) · 1.51 KB

LOGO

1. Flow Control - Switch, case and default

Switch, case, and default are flow control methods too. Please see the usage below.

See an example:

...
	#
	$i = 1
	switch($i)
		case(0)
			console.printLine("$i = 0")
		end
		case(1)
			console.printLine("$i = 1")
		end
		case(2)
			console.printLine("$i = 2")
		end
		default
			console.printLine("default: $i = " + $i)
		end
	end
...

Please note, default block is optional.

2. Links

2.1. Language Documentation

2.2. Other Links