Thread: newbie question - if statements without conditions

  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    5

    newbie question - if statements without conditions

    Hello,
    trying to understand some code I've been using and I often come across if statements without actual conditions. for example:

    Code:
    if(bcs)
    {
     statements
    }
    (bcs is an integer here)

    why is there no condition statement? is there a default for if statements (enter the loop if bcs is defined?)?

    thanks

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    bcs is false if it is zero. bcs is true if it is not zero.

  3. #3
    Registered User
    Join Date
    Jun 2008
    Posts
    5
    thanks!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. While Statements Question
    By thekautz in forum C++ Programming
    Replies: 4
    Last Post: 11-09-2008, 02:48 PM
  2. Stupid Newbie question
    By TimL in forum C++ Programming
    Replies: 4
    Last Post: 07-22-2008, 04:43 AM
  3. Newbie with Very Newbie Question
    By Jedi_Mediator in forum C++ Programming
    Replies: 18
    Last Post: 07-01-2008, 08:00 AM
  4. C prog newbie question
    By Draginzuzu in forum C Programming
    Replies: 1
    Last Post: 02-03-2003, 06:45 PM
  5. a stupid question from a newbie
    By newcomer in forum C++ Programming
    Replies: 4
    Last Post: 01-11-2003, 04:38 PM