Discussion Board

Results 1 to 2 of 2
  1. #1
    Super Contributor
    Join Date
    Mar 2003

    varible headache

    Hi I'm a C/C++ programmer doing some WAP programming for my University. I'm getting a bit confused by varibles in WML & WMLS. Are all varibles global to all the cards in the deck or local to one card only? How do I pass data between cards if the varibles are local? Please help me I've been through all the documentation I could find on the site and it does not seem to explain it!


    Daniel brown

    Posted by Daniel Brown, daniel@therealitydysfunction.com
    on June 26, 2000 at 18:18

  2. #2
    Super Contributor
    Join Date
    Mar 2003

    RE: varible headache

    Posted by mario gianota, MarioGianota@SimultaneousMillions.com
    on June 26, 2000 at 20:30

    Hi Daniel,

    WML variables are stored within the browser's Browser Context. The context acts like a memory cache. When a variable is declared in WML or WMLS the name and value are loaded into the browser context and saved for future reference.

    Any WML Deck can access a variable previously saved within the context simply by naming the variable. For example, $(myVar)
    would cause the browser to substitute the value of the variable
    named myVar with everything between the brackets.

    Once a variable is in the browser context any WML Deck can
    reference it by name (as can any WML Script).

    All variables declared in WML have a global scope. Local
    variable declaration is possible only through the WML Script.
    In the case of the script, certain variables exist only within the
    scope of the function.

    If you're stuck for examples, try:

    You'll find a whole bunch of WML and WML Script that makes
    heavy use of variables. Including some examples that show
    how to pass variables between the script and a card.

    Mario Gianota

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts