| HTML Tutorials |
|
|
| XML Tutorials |
|
|
| Browser Scripting |
|
|
| Server Scripting |
|
|
| .NET (dotnet) |
|
|
| Multimedia |
|
|
| Web Building |
|
|
| Java Tutorials |
|
|
| Programming Langauges |
|
|
| Soft Skills |
|
|
|
 |
 |
|
The WML Functions
|
|
The related WMLScript statements can be executed together as the unit known as the
function. A function declaration in WML has the following syntax:
|
extern function identifier(FormatParameterList)
Block ;
|
|
|
The keyword extern is optional and it is used to specify the function which can be called
from outside a current compilation unit in which that function is been defined. A sample
function declaration of WMLScript looks this:
|
function RunTime(distance, speed)
{
var time = distance / speed;
return time;
};
|
|
|
In the above example it simply takes the two input variables, the distance and the speed,
and uses both of them to calculate the time variable. Then the keyword return is used
to return the value.
|
|
While calling the function included with one of a WMLScript standard libraries,
the library name should be included with a function call. Consider for an example,
to call a String library’s length() function, we make useof the following syntax:
|
|
var a = String.length("0123456789");
|
|
Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
Keywords: if functions, char functions, form functions, left functions, array functions,
document functions, strings functions, character functions, parse functions,
position functions, count functions, get functions, replace functions,
comparison functions, find functions, arrays functions, methods functions,
parsing functions, variable functions, number functions, format functions,
select functions, compare functions, text functions, date functions,
object functions, functions code, key functions, value functions
|
|
| HTML Quizes |
|
|
| XML Quizes |
|
|
| Browser Scripting Quizes |
|
|
| Server Scripting Quizes |
|
|
| .NET (dotnet) Quizes |
|
|
| Multimedia Quizes |
|
|
| Web Building Quizes |
|
|
| Java Quizes |
|
|
| Programming Langauges Quizes |
|
|
| Soft Skills Quizes |
|
|
|