title: How to return a Boolean Value inside if else condition to a function in swift 2.0?
body: <p>I have problem with returning a boolean value in swift. Initially i created a function(statusAssign) that passing the value to the another constructor(isLoggedIn). Now, this constructor return the gated value from statusAssign function. so, How can i do this?. my coding is below but it seems error.</p>
  
  <pre><code>func statusAssign()
  {
      let state = "1"
  
      isLoggedIn(state)
  }
  
  internal func isLoggedIn(status:String) -&gt; Bool
  {
      var gc:Bool
  
      if status == "1"
      {
          gc = true
      }
      else
      {
         gc = false
      }
  
  return gc  //Error 1:  return is Nil while wrapping an optional value
  }
  
  func usage()
  {
      if isLoggedIn() == true  //Error2: Missing Argument for Parameter #1 in call
      {
          print("Buddy is true")
      }
      else
      {
          print("Buddy is false")
      }
  }
  </code></pre>