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. If True = False Then

If True = False Then

Scheduled Pinned Locked Moved The Weird and The Wonderful
28 Posts 14 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.
  • P PIEBALDconsult

    dan neely wrote:

    any decent text editor

    Like Notepad?

    D Offline
    D Offline
    Dan Neely
    wrote on last edited by
    #3

    maybe, I'd've used a regex to match on the start of a line. I know notepad doesn't do that, can it match on the newline char itself?

    Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall

    P 1 Reply Last reply
    0
    • D Dan Neely

      Seen in a VBA app in lieu of commenting out/deleting 138 lines of junk code. Yes, the VBA editor is a steaming pile of excrement, but any decent text editor will let you insert the ' via a global insert/replace. :((

      Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall

      B Offline
      B Offline
      BillW33
      wrote on last edited by
      #4

      Maybe the programmer thought they would enable that section of code later? Even then, it is better, IMO, to comment out the section of code until it is needed. Bill W

      D S 2 Replies Last reply
      0
      • D Dan Neely

        Seen in a VBA app in lieu of commenting out/deleting 138 lines of junk code. Yes, the VBA editor is a steaming pile of excrement, but any decent text editor will let you insert the ' via a global insert/replace. :((

        Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall

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

        The first 2 letters in the language should tell you why that code exists. :laugh:

        G 1 Reply Last reply
        0
        • E ednrg

          The first 2 letters in the language should tell you why that code exists. :laugh:

          G Offline
          G Offline
          GibbleCH
          wrote on last edited by
          #6

          Exactly, any real programmer would write "if (!true)"

          1 Reply Last reply
          0
          • D Dan Neely

            maybe, I'd've used a regex to match on the start of a line. I know notepad doesn't do that, can it match on the newline char itself?

            Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall

            P Offline
            P Offline
            PIEBALDconsult
            wrote on last edited by
            #7

            dan neely wrote:

            can it match on the newline char itself

            Not that I've found, I usually resort to opening the file in Word to do that. X|

            R 1 Reply Last reply
            0
            • B BillW33

              Maybe the programmer thought they would enable that section of code later? Even then, it is better, IMO, to comment out the section of code until it is needed. Bill W

              D Offline
              D Offline
              Dan Neely
              wrote on last edited by
              #8

              actually it was originally needed, but subsequently "commented out" code.

              Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall

              1 Reply Last reply
              0
              • D Dan Neely

                Seen in a VBA app in lieu of commenting out/deleting 138 lines of junk code. Yes, the VBA editor is a steaming pile of excrement, but any decent text editor will let you insert the ' via a global insert/replace. :((

                Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall

                P Offline
                P Offline
                Paul Conrad
                wrote on last edited by
                #9

                dan neely wrote:

                the VBA editor is a steaming pile of excrement

                Well put.

                "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham

                1 Reply Last reply
                0
                • D Dan Neely

                  Seen in a VBA app in lieu of commenting out/deleting 138 lines of junk code. Yes, the VBA editor is a steaming pile of excrement, but any decent text editor will let you insert the ' via a global insert/replace. :((

                  Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall

                  B Offline
                  B Offline
                  Baconbutty
                  wrote on last edited by
                  #10

                  code code code GOTO leap_over dodgy code that should have been commented leap_over: continue from here yet another use for GOTO :)

                  I still remember having to write your own code in FORTRAN rather than be a cut and paste merchant being pampered by colour coded Intellisense - ahh proper programming - those were the days :)

                  P 1 Reply Last reply
                  0
                  • B Baconbutty

                    code code code GOTO leap_over dodgy code that should have been commented leap_over: continue from here yet another use for GOTO :)

                    I still remember having to write your own code in FORTRAN rather than be a cut and paste merchant being pampered by colour coded Intellisense - ahh proper programming - those were the days :)

                    P Offline
                    P Offline
                    PaulPrice
                    wrote on last edited by
                    #11

                    GOTO rules, lets start the fight to bring this wonderful statement back into acceptable use...

                    Just racking up the postings

                    B 1 Reply Last reply
                    0
                    • B BillW33

                      Maybe the programmer thought they would enable that section of code later? Even then, it is better, IMO, to comment out the section of code until it is needed. Bill W

                      S Offline
                      S Offline
                      Star Vega
                      wrote on last edited by
                      #12

                      even better than if (2 == 2) :laugh:

                      1 Reply Last reply
                      0
                      • P PaulPrice

                        GOTO rules, lets start the fight to bring this wonderful statement back into acceptable use...

                        Just racking up the postings

                        B Offline
                        B Offline
                        Baconbutty
                        wrote on last edited by
                        #13

                        I have no problems at all using GOTO in small sections of code. Beats all that complicated logic and program flow nonsense :)

                        I still remember having to write your own code in FORTRAN rather than be a cut and paste merchant being pampered by colour coded Intellisense - ahh proper programming - those were the days :)

                        S 1 Reply Last reply
                        0
                        • D Dan Neely

                          Seen in a VBA app in lieu of commenting out/deleting 138 lines of junk code. Yes, the VBA editor is a steaming pile of excrement, but any decent text editor will let you insert the ' via a global insert/replace. :((

                          Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall

                          C Offline
                          C Offline
                          ChandraRam
                          wrote on last edited by
                          #14

                          dan neely wrote:

                          but any decent text editor will let you insert the ' via a global insert/replace.

                          AFAIK, the VBA editor within any MS Office application does have this feature...

                          D P 2 Replies Last reply
                          0
                          • C ChandraRam

                            dan neely wrote:

                            but any decent text editor will let you insert the ' via a global insert/replace.

                            AFAIK, the VBA editor within any MS Office application does have this feature...

                            D Offline
                            D Offline
                            Dan Neely
                            wrote on last edited by
                            #15

                            IF so, could you please tell me where? I can't find it in excel 2k7.

                            Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall

                            C P 2 Replies Last reply
                            0
                            • D Dan Neely

                              IF so, could you please tell me where? I can't find it in excel 2k7.

                              Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall

                              C Offline
                              C Offline
                              ChandraRam
                              wrote on last edited by
                              #16

                              Well, I don't use MS Office 2007... :) In 2003 though, it is a button in the "Edit" tool bar (Menu -> View -> Toolbars)

                              D 1 Reply Last reply
                              0
                              • C ChandraRam

                                Well, I don't use MS Office 2007... :) In 2003 though, it is a button in the "Edit" tool bar (Menu -> View -> Toolbars)

                                D Offline
                                D Offline
                                Dan Neely
                                wrote on last edited by
                                #17

                                TY. The VBA editor didn't change except that it uses the same theme color as the rest of office in the menu/toolbar backgrounds. All the dividers/headers elsewhere are still win32 gray. The combination is almost WTF enough to make you think no one in MS cares. :rolleyes:

                                Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall

                                C 1 Reply Last reply
                                0
                                • D Dan Neely

                                  TY. The VBA editor didn't change except that it uses the same theme color as the rest of office in the menu/toolbar backgrounds. All the dividers/headers elsewhere are still win32 gray. The combination is almost WTF enough to make you think no one in MS cares. :rolleyes:

                                  Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall

                                  C Offline
                                  C Offline
                                  ChandraRam
                                  wrote on last edited by
                                  #18

                                  dan neely wrote:

                                  no one in MS cares.

                                  :) That's probably true, given that MS now recommends using VSTO instead of VBA.

                                  D 1 Reply Last reply
                                  0
                                  • C ChandraRam

                                    dan neely wrote:

                                    no one in MS cares.

                                    :) That's probably true, given that MS now recommends using VSTO instead of VBA.

                                    D Offline
                                    D Offline
                                    Dan Neely
                                    wrote on last edited by
                                    #19

                                    Not to mention office 2k8 (mac version of 2k7) doesn't support VBA at all. To make it perform well on early/mid 90's level hardware the VBA compiler/interpreters were written with large amounts of assembly code for speed so porting the PPC version to x86 wasn't an option, and the PC/mac versions ended up with very different back end connections for what were good reasons at the time; which meant they couldn't port the wintel version over either. Office for mac doesn't sell enough copies to have a very large team (it's fully funded on it's own sales), and the dev team estimated 2 years to rewrite the VBA engine.

                                    Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall

                                    1 Reply Last reply
                                    0
                                    • C ChandraRam

                                      dan neely wrote:

                                      but any decent text editor will let you insert the ' via a global insert/replace.

                                      AFAIK, the VBA editor within any MS Office application does have this feature...

                                      P Offline
                                      P Offline
                                      Paul Conrad
                                      wrote on last edited by
                                      #20

                                      Yes, it does have it. When I have to swallow my pride and do any VBA in Access, the search and replace is there and it is useful.

                                      "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham

                                      1 Reply Last reply
                                      0
                                      • D Dan Neely

                                        IF so, could you please tell me where? I can't find it in excel 2k7.

                                        Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall

                                        P Offline
                                        P Offline
                                        Paul Conrad
                                        wrote on last edited by
                                        #21

                                        I cannot find it either. As you have mentioned in the other post, it must be a VSTO thing.

                                        "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham

                                        T 1 Reply Last reply
                                        0
                                        • P PIEBALDconsult

                                          dan neely wrote:

                                          can it match on the newline char itself

                                          Not that I've found, I usually resort to opening the file in Word to do that. X|

                                          R Offline
                                          R Offline
                                          Rob Grainger
                                          wrote on last edited by
                                          #22

                                          I'd recommend Notepad++ a free replacement for Notepad, with all those regex goodies you've been missing

                                          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