O'Reilly logo

Learning WML, and WMLScript by Martin Frost

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Blocks of Statements

Another simple type of statement is the block statement. This is simply a number of statements collected together and surrounded with curly braces. These are often used with if statements and while and for loops, to allow the parts of the if or the body of the loop to contain more than one statement.

For example:

{} is an empty block
{ a = b; } contains only one statement
{ a = b; foo (); bar ( ); } contains three statements

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required