Processing with WMLScript
Now let's switch gears and examine the process.wmls file. This file is entirely WMLScript and consists of two functions. The first one is called convert which takes in an amount of currency tAmount, and then sets a variable new_amount equal to the conversion. For more information on WMLScript, see Chapter 9, "Using WMLScript."
This function is declared as an extern because we will need to have another deck access it; therefore, we want it to be visible to outside callers.
extern function convert(tAmount) {
Getting the Exchange Rate
The first thing we will do is allow the user to set the exchange rate. Since a user might be using this application for the first time, it is entirely possible that the variable exchange_rate ...
Get WAP Development with WML and WMLScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.