Results 1 to 3 of 3

Thread: [Q] Boolean flags

  1. #1
    Join Date
    Jul 2012
    Location
    England
    Posts
    144
    Mentioned
    1 Post(s)
    Quoted
    28 Post(s)

    Default [Q] Boolean flags

    Hi, I want to know how to make use of boolean flags in simba. The flags are to be used to flag when the bank is successfully opened

    e.g.

    Java Example

    Code:
     bool boolFlag= false;
    
       if(accessBank = true)
        {
          boolFlag = true;
        }
        
         if(boolFlag = true)
         {
           depositInven();
          }

  2. #2
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Well you could go about this a couple of ways:
    Simba Code:
    if aBoolean then
      Writeln('A true boolean!')
    else if not aBoolean then
      Writeln('It is false...');

    if (aBoolean = True) then
      Writeln('A true boolean!')
    else if (aBoolean = False) then
      Writeln('It is false...');

    If you'd like a little more info on the subject you can check out this post but I don't think it's very relevant to your question.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  3. #3
    Join Date
    Nov 2012
    Location
    USA
    Posts
    153
    Mentioned
    1 Post(s)
    Quoted
    33 Post(s)

    Default

    It should be called a boolean variable, or perhaps boolean value, but not flag. AFAIK flags are only when you call a program via a text command e.g.:
    Code:
    hackplanet.exe -target:world
    -target:world would be considered the flag part of the command

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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