bool ????

Discussion in 'Jiggy Runtime Development' started by rob spriggs, Jun 30, 2008.

  1. rob spriggs

    rob spriggs New Member

    Joined:
    Jan 26, 2008
    Messages:
    28
    Likes Received:
    0
    ok i have been reading through the online docs for jiggy and trying to make sinse out of it all which has not been an easy thing! everywhere i look i see Bool as in the example below

    bool move( string source ,
    string destination )

    cansome one please explain what bool is and if it is to be included in the syntax.

    thanks for you help
  2. PAEz

    PAEz New Member

    Joined:
    Jan 29, 2008
    Messages:
    201
    Likes Received:
    10
    that came from like the docs aye?
    well in that case the first word "bool" is what is returned by the following function which is move.
    And a bool is a type of variable that can contain true or false.
    So in the case of the move function it will return a bool value to tell you if it succeded in the move.
    so you could do something like....
    if ( move( "/directory/sourcefile", "/directory/destinationfile") ){
    //it worked
    } else {
    //it failed
    }

    Actually if your asking about bool then you should prolly be reading some docs on codeing JavaScript.....
    tutorials...
    http://www.w3schools.com/js/default.asp
    reference...
    http://www.w3schools.com/jsref/default.asp

    Javascript is the language used in jiggy. Jiggy is kinda a thing that brings Java Script and the iPhones API together.
    Youll get all the iPhone speceific stuff in the jiggy docs, but the docs for the language youll find above.
  3. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    a BOOL, or boolean, is an object returning a value. now, it can be used to determine things. it returns yes or no.


    when you use an if() statement in any coding, that is basically returning a boolean of whether or not whats in if() is true or not.
  4. rob spriggs

    rob spriggs New Member

    Joined:
    Jan 26, 2008
    Messages:
    28
    Likes Received:
    0
    thanks for clearing that up, that makes it a lot simpler to understand

Share This Page