Page 165 - DCAP512_WAP_AND_WML
P. 165

abort()        Aborts a WML Script and returns a message to the caller of the script
             abs()          Returns the absolute value of a number
                                                                                         Unit 11: Using WML Script
             characterSet()   Returns the character set supported by the WML Script interpreter
             exit()         Exits a WML Script and returns a message to the caller of the script
             float()        Returns true if floating-point numbers are supported, and false if not
             isFloat()      Returns true if a specified value can be converted into a float-point number   Notes
                            by the parseFloat() function, false if not
             isInt()        This  validates  whether  the  given  parameter  value  can  be  converted  to  an
                            integer  or  not.  A  Boolean  value  is  returned  if  the  given  value  can  be
                            converted to an integer number using parseInt(value), else false is returned
             max()          Returns the largest value of two number
             maxInt()       Returns the maximum possible integer value
             min()          Returns the smallest value of two numbers
             minInt()       Returns the minimum possible integer value
             parseInt()     Returns an integer defined by a string
             random()       Returns a random integer between 0 and a specified number
             seed()         Initializes  the  random  number  generator  with  a  number,  and  returns  an
                            empty string
             parseFloat()   Returns a floating point value defined by a string

          URL Library

                                            Table  11.10

             escapeString()   Replaces special characters in a URL with an escape sequence, and
                              returns the result
             getFragment()    Returns the fragment in a URL
             getHost()        Returns the host specified in a URL
             getParameters()   Returns the parameters in the last path segment of a URL
             getPath()        Returns the path specified in a URL
             getPort()        Returns the port number specified in a URL
             getQuery()       Returns the query part in a URL
             getScheme()      Returns the schema in a URL
             isValid()        Returns true if a URL has the right syntax, and false if not
             loadString()     Returns the content and the content type of a specified URL
             resolve()        Returns an absolute URL from a base URL and a relative URL
             unescapeString()   Replaces the escape sequence in a URL with characters and return
                              the result





              Task  Does  WMLScript support  arrays? If  not then what do  you mean  by  arrays in
             WMLScript?



          11.5 Sample Application

          WMLScript’s Dialogs standard library contains three functions — alert(), confirm() and prompt().
          They are used to display alert messages, confirmation messages and input boxes to users. They






                                           LOVELY PROFESSIONAL UNIVERSITY                                   159
   160   161   162   163   164   165   166   167   168   169   170