Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.08 seconds.

  1. Replies
    3
    Views
    1,111

    Re: Convert int to a bool

    I guess it's a personal preference, but while(i == 1) seems fine to me. In fact I would say it's better than just while(i) because it makes it clear that 1 is the only value it should continue for.
    ...
  2. Replies
    3
    Views
    1,111

    Re: Convert int to a bool

    A boolean expression can be expressed like this:

    i==0
    i<76
    i!=17
    etc.

    These evaluate to a boolean value (true or false). You can use boolean values in things like if statements and while...
Results 1 to 2 of 2