Logo         Community
The Company
Your Account
Contact Us
Demystifying WMLScript (part 2)
Loops, operators, and some pre-defined WMLScript functions.

| A Little Bit Of Logic |

After last week's introduction to the world of WMLScript, you should have a clearer idea of how WMLScript variables are created and manipulated in the wireless space. In this concluding article, we'll be exploring WMLScript's loops, functions and in-built browser libraries, together with a look at some simple WMLScript applications that should get you started on the road to building cool toys for all the yuppies to play with on their cellphones.

Before we begin with loops, however, you need to know about the three important logical operators supported in WMLScript. They are:

the || operator - used to indicate an OR condition

the && operator - used to indicate an AND condition

the ! operator - used to indicate a NOT condition

These operators come in very handy when building compact conditional expressions.

For example, consider this:

if (a == 0 || a == 1)
do this!

In English, this would translate to "if a equals zero OR a equals one, do this!"

But in the case of

if (a == 0 && b == 0)
do this!

the "do this!" statement would be executed only if a equals zero AND b equals zero.

The third logical operator, the NOT operator, is usually indicated by a prefixed exclamation mark[!], and is used to reverse the sense of a conditional expression. Consider the two examples below:

if (a)
do this!

In English, "if a exists, do this!"

if (!a)
do this!

In English, "if a does NOT exist, do this!"

Got that? All righty, let's move on to loops!

How to do Everything with PHP & MySQL
How to do Everything with PHP & MySQL, the best-selling book by Melonfire, explains how to take full advantage of PHP's built-in support for MySQL and link the results of database queries to Web pages. You'll get full details on PHP programming and MySQL database development, and then you'll learn to use these two cutting-edge technologies together. Easy-to-follow sample applications include a PHP online shopping cart, a MySQL order tracking system, and a PHP/MySQL news publishing system.

Read more, or grab your copy now!

more like this print this article  next page
In trog...
Logging With PHP
Building A Quick-And-Dirty PHP/MySQL Publishing System
Output Buffering With PHP
Date/Time Processing With PHP
Creating Web Calendars With The PEAR Calendar Class
In the hitg report...
Crime Scenes
Animal Attraction
Lord Of The Strings
In boombox...
Patience - George Michael
Think Tank - Blur
My Private Nation - Train
In colophon...
Hostage - Robert Crais
The Dead Heart - Douglas Kennedy
Right As Rain - George Pelecanos
In cut!...
American Chai
The Core
Find out how you can use this article on your own Web site!

Copyright © 1998-2018 Melonfire. All rights reserved
Terms and Conditions | Feedback