Skip to content
Silica edited this page Mar 1, 2012 · 1 revision

#goto goto-statement is jump to label.
can jump to same or outside scope in function.
cannot jump to other function.
cannot jump to inside scope. ##goto statement goto identifier; ##label identifier: ##example int i = 0; label: print(i); // 0 to 9 i++; if (i < 10) goto label;

goto cannot jump to inside scope.

goto label;	// jump fail
if (x)
{
	label:
	print(x);
}
Clone this wiki locally