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. #define #undefine #define sequence result ?

#define #undefine #define sequence result ?

Scheduled Pinned Locked Moved C / C++ / MFC
question
5 Posts 2 Posters 36 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    If my preprocessor define / undefine code hierarchy is in this sequence:

    #define TEST
    #undefine TEST
    #define TEST

    assuming it is read "top to bottom " is "TEST" defined?

    Mircea NeacsuM L 4 Replies Last reply
    0
    • L Lost User

      If my preprocessor define / undefine code hierarchy is in this sequence:

      #define TEST
      #undefine TEST
      #define TEST

      assuming it is read "top to bottom " is "TEST" defined?

      Mircea NeacsuM Offline
      Mircea NeacsuM Offline
      Mircea Neacsu
      wrote on last edited by
      #2

      Salvatore Terress wrote:

      is "TEST" defined?

      Most certainly PS. By #undefine I assume you mean #undef. #undefine is not a standard preprocessor keyword

      Mircea

      1 Reply Last reply
      0
      • L Lost User

        If my preprocessor define / undefine code hierarchy is in this sequence:

        #define TEST
        #undefine TEST
        #define TEST

        assuming it is read "top to bottom " is "TEST" defined?

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        It's easy enough to test it with a few lines of code. But why would you want to do this in the first place?

        1 Reply Last reply
        0
        • L Lost User

          If my preprocessor define / undefine code hierarchy is in this sequence:

          #define TEST
          #undefine TEST
          #define TEST

          assuming it is read "top to bottom " is "TEST" defined?

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Sorry, I mixed up C and make. THANKS

          1 Reply Last reply
          0
          • L Lost User

            If my preprocessor define / undefine code hierarchy is in this sequence:

            #define TEST
            #undefine TEST
            #define TEST

            assuming it is read "top to bottom " is "TEST" defined?

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            Sorry, I mixed up C and make. THANKS

            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