answersLogoWhite

0

Type of and isvalid operator in wml?

Updated: 8/18/2019
User Avatar

Wiki User

13y ago

Best Answer

isvalid:- Isvalid is a operator whic returns the true value if a URL has right syntax,and also returns a false if URL has wrong syntax.

in other word we can say that,

The isvalid operator is used to test the validity of a variable or the result type of executing an expression. A boolean value is returned to denote the results of the test. A true is returned if the variable or result type is valid. A false is returned if the variable or result type is invalid.

Do not confuse this operator with the URL.isValid function which is used to validate the syntax of a URL address string.

The classic case of an invalid result type for an expression is dividing by zero. In this example, as expected, the isvalid operator returns a false.

Type of:-The typeof operator is used to determine the type of a given expression. An integer is returned that defines the type.

There are five types recognized by WMLScript:

TypeIntegerInteger0Floating-point1String2Boolean3Invalid4

This example tests two expressions; the first is a floating-point number and the second is division by zero which is invalid.

Examples">Examples">Examples

Code:

"http://www.WAPforum.org/DTD/wml_1.1.xml">

typeof example

1st expression = $(expression1)


1st type = $(typeinteger1)


2cd expression = $(expression2)


2cd type = $(typeinteger2)

Explanation:

Code for TypeofExample.wml.

Language(s): WML

Code:extern function findtypeof()

{

var exp1 = 123.456;

var int1 = typeof(exp1);

WMLBrowser.setVar("expression1", exp1);

WMLBrowser.setVar("typeinteger1", int1);

var exp2 = 1/0;

var int2 = typeof(exp2);

WMLBrowser.setVar("expression2", exp2);

WMLBrowser.setVar("typeinteger2", int2);

WMLBrowser.go("TypeofExample.wml#card2");

};

posted by samsher singh B level

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Type of and isvalid operator in wml?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you write in WML?

WML is not a new language. Rather, it is only XML that is "geared to work" with cell phones, PDAs, and other portable / wireless devices. To make it "gear to work" this way, the following changes should be made in WML documents - and nothing else.---- WML is placed in WML-type documents ("file.wml"), instead of XML-type documents ("file.xml") WML documents should have a Document Type Declaration pointing to WML. The tag still must be declared, regardless if your writing WML or not!


What is the difference between the xml and wml?

XML and WML both use the same markup / language. If you know XML, you know WML - and vice versa. However, XML is intentionally developed for computers, or other devices with larger screens. WML is developed for smaller-screened devices, such as PDA's and cell phones. Regardless, most devices, small or large screen'ed, now accept both formats of the XML language without complaining - but users may notice a difference in layout. On the technical side of things, WML standards branch off XML standards (which determine how things should be layed out on a screen or other display) - making the standards relatively different. WML is placed in WML-type documents ("file.wml"), as XML is placed in XML-type documents ("file.xml"). WML documents should have a Document Type Declaration pointing to an WML standard, as XML documents should have a Document Type Declaration pointing to an XML standard.


What are the advantages of WML Script over WML?

[object Object]


What does WML refer to?

WML refers to Wireless Markup Language. It is a markup language that is used for mobiles.


What is WAP and WML?

Define ADO


What is the abbreviation for WML in HTML?

WML is the short form of Wireless Markup Language. It is mainly used for Wireless devices like mobiles.


What is wml?

stand's for Whatever major loser


What is WML regarding cell phones?

WML stands for Wireless Mark-up Language. It's the mobile-phone equivalent of HTML used on the internet.


When an operator works on various type of operands is called?

operator overloading


What is the correct declaration of the assignment operator overloaded function inside the travel class?

class travel {...travel &operator=( some type );... or ...travel operator=( some type );...};


What is wml scripting?

WML scripting is the act of scripting / coding / writing in the language of WML - which is just slightly adjusted XML that is made for mobile devices. WMLScript (Wireless Markup Language Script) is the client-side scripting language of WML (Wireless Markup Language). A scripting language is similar to a programming language, but is of lighter weight. With WMLScript, the wireless device can do some of the processing and computation. This reduces the number of requests and responses to/from the server.


What are the features of wml?

WML (Wireless Markup Language) is a markup language designed for mobile devices. Its features include simplicity, compatibility with various devices, and the ability to create basic mobile web pages with limited functionality. WML is now largely obsolete, as modern mobile browsers support more advanced web technologies like HTML5.