Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. what does this mean: variable =! variable

what does this mean: variable =! variable

Scheduled Pinned Locked Moved C / C++ / MFC
question
7 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jan Sommer
    wrote on last edited by
    #1

    I know this probably is the worlds most simple and stupid question, yet I'm having a pretty hard time figuring out what it means. some simple code:

    int some_variable;

    some_variable =! some_variable;

    What does =! mean!? And what is that kind of assigning called? Just so i'm able to look up more info about it...

    C D E V L 5 Replies Last reply
    0
    • J Jan Sommer

      I know this probably is the worlds most simple and stupid question, yet I'm having a pretty hard time figuring out what it means. some simple code:

      int some_variable;

      some_variable =! some_variable;

      What does =! mean!? And what is that kind of assigning called? Just so i'm able to look up more info about it...

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      bool b = false; bool not_b_1 = !b; bool not_b_2 =! b; and now, not_b_1 == true and not_b_2 == true

      image processing toolkits | batch image processing

      J 1 Reply Last reply
      0
      • C Chris Losinger

        bool b = false; bool not_b_1 = !b; bool not_b_2 =! b; and now, not_b_1 == true and not_b_2 == true

        image processing toolkits | batch image processing

        J Offline
        J Offline
        Jan Sommer
        wrote on last edited by
        #3

        Thanks man :)

        1 Reply Last reply
        0
        • J Jan Sommer

          I know this probably is the worlds most simple and stupid question, yet I'm having a pretty hard time figuring out what it means. some simple code:

          int some_variable;

          some_variable =! some_variable;

          What does =! mean!? And what is that kind of assigning called? Just so i'm able to look up more info about it...

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          Jan Sommer wrote:

          What does =! mean!?

          This might help. It assigns the "not" value of some_variable.

          "Love people and use things, not love things and use people." - Unknown

          "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

          1 Reply Last reply
          0
          • J Jan Sommer

            I know this probably is the worlds most simple and stupid question, yet I'm having a pretty hard time figuring out what it means. some simple code:

            int some_variable;

            some_variable =! some_variable;

            What does =! mean!? And what is that kind of assigning called? Just so i'm able to look up more info about it...

            E Offline
            E Offline
            Eytukan
            wrote on last edited by
            #5

            It means the opposite.(NOT of) If it was 1, makes it 0 If it was 0, makes it 1 Simple is it *not* :rolleyes: ?


            OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus Best wishes to Rexx[^]

            modified on Saturday, June 14, 2008 4:27 AM

            1 Reply Last reply
            0
            • J Jan Sommer

              I know this probably is the worlds most simple and stupid question, yet I'm having a pretty hard time figuring out what it means. some simple code:

              int some_variable;

              some_variable =! some_variable;

              What does =! mean!? And what is that kind of assigning called? Just so i'm able to look up more info about it...

              V Offline
              V Offline
              Vaclav_
              wrote on last edited by
              #6

              2b|!2b = ? William Shakespeare Hamlet Seriously - I am not so sure this variable =! variable is a proper C syntax anyway. By itself it is a "logical NOT operator". In this example the compiler (VC6.0) sees it as variable = !variable assignment. (Space after = sign is “assumed”?) Not too clear since if you write variable != variable it is interpreted as variable not equal variable as used in if(variable != variable) test condition. A completely different operator! Again - by itself it does not make any sense in if statement. Would be nice to know if someone knows what the ANSI standard for C says. I have not found "=!" in MSDN by itself. Personally I would stay away from using it without space after the equal sign – it reads better. Vaclav

              1 Reply Last reply
              0
              • J Jan Sommer

                I know this probably is the worlds most simple and stupid question, yet I'm having a pretty hard time figuring out what it means. some simple code:

                int some_variable;

                some_variable =! some_variable;

                What does =! mean!? And what is that kind of assigning called? Just so i'm able to look up more info about it...

                L Offline
                L Offline
                liuxianming2001
                wrote on last edited by
                #7

                =! is not an assignment operator int some_variable; some_variable =! some_variable; means assigning (! some_variable) to some_variable ;)

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups