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. Other Discussions
  3. The Weird and The Wonderful
  4. This is just beautiful!

This is just beautiful!

Scheduled Pinned Locked Moved The Weird and The Wonderful
7 Posts 7 Posters 2 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
    jchigg2000
    wrote on last edited by
    #1

    If txtProvCt.Text = txtProvCtS Then Else giUpdate = True End If

    C T N K S 5 Replies Last reply
    0
    • J jchigg2000

      If txtProvCt.Text = txtProvCtS Then Else giUpdate = True End If

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #2

      and not unusual... :-D

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

      P 1 Reply Last reply
      0
      • C CPallini

        and not unusual... :-D

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #3

        CPallini wrote:

        and not unusual...

        Queue the Tom Jones soundtrack.

        Deja View - the feeling that you've seen this post before.

        1 Reply Last reply
        0
        • J jchigg2000

          If txtProvCt.Text = txtProvCtS Then Else giUpdate = True End If

          T Offline
          T Offline
          The ANZAC
          wrote on last edited by
          #4

          Lol, i used to do that when i first was teaching myself, then i discovered if not.

          Posted by The ANZAC

          1 Reply Last reply
          0
          • J jchigg2000

            If txtProvCt.Text = txtProvCtS Then Else giUpdate = True End If

            N Offline
            N Offline
            NormDroid
            wrote on last edited by
            #5

            Ah a VB users snippet, lack of understanding promotes bad coding.

            .net is a box of never ending treasures, every day I get find another gem.

            1 Reply Last reply
            0
            • J jchigg2000

              If txtProvCt.Text = txtProvCtS Then Else giUpdate = True End If

              K Offline
              K Offline
              Kochise
              wrote on last edited by
              #6

              It's one of my coding rules, which is really useful once you get the point :

              if(NULL != l_poStrTest)
              { // Format error message
              l_poStrTest->Format
              ( "My code : %d"
              , l_nErrorCode
              );
              }
              else
              { // Error code
              }

              It's also all about defines :

              #define MY_TEST

              #ifndef MY_TEST
              int l_nSize = GetStringSize(l_poStrText);
              #else // MY_TEST
              // int l_nSize = TempoFunc(l_poStrText);
              #endif // MY_TEST

              By doing so, I write the full structure of the code which is then ready to fill up, and it also helps to keep an eye-track of the execution logic (inequal statement first) so that you don't have to know if the test is about inequality (!= or #ifndef) or equality (== or #ifdef). You just have to spot the upper or lower block of code and see if it is defined/filled or not... This also force to structure carefully your code and put some air between the lines, instead to write a rock-compact block of code... Kochise PS : I often write empty equality code like this

              if(NULL != l_poStrTest)
              { // Format error message
              l_poStrTest->Format
              ( "My code : %d"
              , l_nErrorCode
              );
              }
              else{} // Error code, ready to be unrolled and filled with error handling code

              In Code we trust !

              1 Reply Last reply
              0
              • J jchigg2000

                If txtProvCt.Text = txtProvCtS Then Else giUpdate = True End If

                S Offline
                S Offline
                Sylvester george
                wrote on last edited by
                #7

                = is more faster than !=..thats why:):-D

                Regards, Sylvester G sylvester_g_m@yahoo.com

                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