Re: what is

Discussion in 'Computer Support' started by Fred Orton, Jun 23, 2003.

  1. Fred Orton

    Fred Orton Guest

    Assuming you mean "use" a boolean. That is a yes-no or true-false variable.

    For example, if you were testing if a number was negative, and wanted to
    store the result, you would create a boolean variable, and set it to "true"
    if the number was negative. You could then use that variable later on in a
    program as a test -- ex: you may not want to perform a mathematical
    operation if the input was a negative number.

    Booleans are mostly used as flags - a condition is met, a variable is
    negative or not, a customer has paid or not, etc...

    Hope this helps,

    Fred.

    "matt" <> wrote in message
    news:_uHJa.1945$...
    > where would i sue a boolean
    >
    >
    Fred Orton, Jun 23, 2003
    #1
    1. Advertising

  2. Fred Orton

    Gram Guest

    It helps link into the rest of the computer science world if you think of it
    as an equivalent of a bit i..e 0 = false and 1 = true. It's a great
    alternative to data types such as integer which is atleast 8 bits :)

    "Fred Orton" <> wrote in message
    news:7EHJa.293973$...
    > Assuming you mean "use" a boolean. That is a yes-no or true-false

    variable.
    >
    > For example, if you were testing if a number was negative, and wanted to
    > store the result, you would create a boolean variable, and set it to

    "true"
    > if the number was negative. You could then use that variable later on in

    a
    > program as a test -- ex: you may not want to perform a mathematical
    > operation if the input was a negative number.
    >
    > Booleans are mostly used as flags - a condition is met, a variable is
    > negative or not, a customer has paid or not, etc...
    >
    > Hope this helps,
    >
    > Fred.
    >
    > "matt" <> wrote in message
    > news:_uHJa.1945$...
    > > where would i sue a boolean
    > >
    > >

    >
    >
    Gram, Jun 23, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page