Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How to match #ifdef #endif ?
Forum Updated to NodeBB v4.3 + New Features

How to match #ifdef #endif ?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
5 Posts 4 Posters 650 Views 2 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.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    The compiler can identify missing #ifdef #endif pair.
    I can manually identify the contents between brackets...

    I need to identify contents between #ifdef ... #endif pair.

    There is a"matchit" package...

    Will it help with the task ?

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      ziller
      wrote on last edited by
      #2

      I need to identify contents between #ifdef ... #endif pair.

      What do you mean with "identify contents"?

      There is a"matchit" package...

      Where is a "matchit" package?

      Will it help with the task ?

      I don't understand the task. Please help us to understand what you want by providing a (small) example of what your code looks like and what you would like to achieve.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Anonymous_Banned275
        wrote on last edited by
        #3

        @AnneRanch said in How to match #ifdef #endif ?:

        I need to identify contents between #ifdef ... #endif pair.

        I need to identify contents between #ifdef ... #endif pair.
        in source code

        #Iifdef THIS

        here is the contents between

        #endif

        If I put mouse on
        #ifdef

        what else I have to do to

        how it will

        go to corresponding

        #endif

        and highlight t the contents between

        #ifdef

        #enbdif
        ?????

        I can this with matching pair of brackets

        Christian EhrlicherC 1 Reply Last reply
        0
        • A Anonymous_Banned275

          @AnneRanch said in How to match #ifdef #endif ?:

          I need to identify contents between #ifdef ... #endif pair.

          I need to identify contents between #ifdef ... #endif pair.
          in source code

          #Iifdef THIS

          here is the contents between

          #endif

          If I put mouse on
          #ifdef

          what else I have to do to

          how it will

          go to corresponding

          #endif

          and highlight t the contents between

          #ifdef

          #enbdif
          ?????

          I can this with matching pair of brackets

          Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @AnneRanch said in How to match #ifdef #endif ?:

          what else I have to do to

          Strg+F, enter '#endif' in the search field

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          0
          • SPlattenS Offline
            SPlattenS Offline
            SPlatten
            wrote on last edited by
            #5

            Its common practice to just put a single line comment at the end of the initial #ifdef line, then again at the end of the matching #endif, e.g:

            #ifdef MY_EXAMPLE //123
            ...
            #endif //123
            

            Kind Regards,
            Sy

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved