ERROR IN EXPRESSION; -1 - (-1) not 1 - (-1)

Discussion in 'C Programming' started by der, Jul 13, 2003.

  1. der

    der Guest

    The expression isn't a = 1 - (1-), but: a = -1 - (1)
    der, Jul 13, 2003
    #1
    1. Advertising

  2. der <> scribbled the following:
    > The expression isn't a = 1 - (1-), but: a = -1 - (1)


    Ah, that's different, then. Then the answer is: The result will be -2.
    You have *no* guarantees about which of -1 or (1) is evaluated first,
    but as they don't have side effects, you don't have to care.

    --
    /-- Joona Palaste () ---------------------------\
    | Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
    | http://www.helsinki.fi/~palaste W++ B OP+ |
    \----------------------------------------- Finland rules! ------------/
    "To doo bee doo bee doo."
    - Frank Sinatra
    Joona I Palaste, Jul 13, 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.
Similar Threads
  1. VSK
    Replies:
    2
    Views:
    2,270
  2. =?iso-8859-1?B?bW9vcJk=?=

    Matching abitrary expression in a regular expression

    =?iso-8859-1?B?bW9vcJk=?=, Dec 1, 2005, in forum: Java
    Replies:
    8
    Views:
    831
    Alan Moore
    Dec 2, 2005
  3. GIMME
    Replies:
    3
    Views:
    11,921
    vforvikash
    Dec 29, 2008
  4. snacktime
    Replies:
    13
    Views:
    554
    Dan Sommers
    Feb 22, 2005
  5. tomer
    Replies:
    0
    Views:
    1,968
    tomer
    Jul 28, 2011
Loading...

Share This Page