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. Awesome!

Awesome!

Scheduled Pinned Locked Moved The Weird and The Wonderful
javarubydata-structurestutorial
9 Posts 7 Posters 3 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

    Found this gem while trying to remember how to instantiate an array in VB6 2 ways to create an array Dim theArray() As Variant theArray() = Array("Spring", "Summer", "Fall", "Winter") or dim strArray as string strArray = split("summer;winter;spring;fall", ";") I went w/ the first one...:)

    A C I J 4 Replies Last reply
    0
    • J jchigg2000

      Found this gem while trying to remember how to instantiate an array in VB6 2 ways to create an array Dim theArray() As Variant theArray() = Array("Spring", "Summer", "Fall", "Winter") or dim strArray as string strArray = split("summer;winter;spring;fall", ";") I went w/ the first one...:)

      A Offline
      A Offline
      Andy Brummer
      wrote on last edited by
      #2

      I can't figure out which one is most atrocious.


      I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon

      D J 2 Replies Last reply
      0
      • A Andy Brummer

        I can't figure out which one is most atrocious.


        I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon

        D Offline
        D Offline
        dighn
        wrote on last edited by
        #3

        I vote the latter :D

        A 1 Reply Last reply
        0
        • D dighn

          I vote the latter :D

          A Offline
          A Offline
          Andy Brummer
          wrote on last edited by
          #4

          Well, given that they are both VB6...


          I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon

          V 1 Reply Last reply
          0
          • A Andy Brummer

            I can't figure out which one is most atrocious.


            I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon

            J Offline
            J Offline
            jchigg2000
            wrote on last edited by
            #5

            I agree that they are both pretty bad. It's the curse of having to dive into some vb6 code on occasion...

            1 Reply Last reply
            0
            • J jchigg2000

              Found this gem while trying to remember how to instantiate an array in VB6 2 ways to create an array Dim theArray() As Variant theArray() = Array("Spring", "Summer", "Fall", "Winter") or dim strArray as string strArray = split("summer;winter;spring;fall", ";") I went w/ the first one...:)

              C Offline
              C Offline
              chrishuff
              wrote on last edited by
              #6

              The second lends itself to replacing the values with a file string and thus more flexible strFileValue = "summer;winter;spring;fall;late fall;early spring;late birthday" 'comes from a configuration file or user settings, or whatever. dim strArray as string strArray = split(strFileValues, ";")

              1 Reply Last reply
              0
              • J jchigg2000

                Found this gem while trying to remember how to instantiate an array in VB6 2 ways to create an array Dim theArray() As Variant theArray() = Array("Spring", "Summer", "Fall", "Winter") or dim strArray as string strArray = split("summer;winter;spring;fall", ";") I went w/ the first one...:)

                I Offline
                I Offline
                Ian Shlasko
                wrote on last edited by
                #7

                There's a third... Which I just dealt with today in an old Excel VBA macro (Essentially VB6)... (Hastily-written, VB-style pseudo-code, as it's faster than removing the proprietary stuff)

                For x = 1 to 13
                Dim line As String
                line = GetLine(x, username, code, thing, item, anotherstring, andanother, blah, blah, blah, blah, blah)

                (Do something with line...)

                Next x

                ...

                Public Function GetLine(x As Long, username As String, etc etc etc etc etc)
                Select Case x
                Case 0
                GetLine = "SomeString="&username
                Case 1
                GetLine = "Something Else=" & code
                Case 2
                GetLine = "Another Thing=" & thing
                ...
                Case 13
                GetLine = "Some literal string"
                End Select
                End Function

                Yes, it passes all those parameters to the function 13 times. Yes, it only uses one of those parameters each time. Yes, every member of that select statement is a simple concatenation of a literal with a string parameter (If even that). Yes, I replaced the whole system with a C# utility as fast as I could.

                1 Reply Last reply
                0
                • J jchigg2000

                  Found this gem while trying to remember how to instantiate an array in VB6 2 ways to create an array Dim theArray() As Variant theArray() = Array("Spring", "Summer", "Fall", "Winter") or dim strArray as string strArray = split("summer;winter;spring;fall", ";") I went w/ the first one...:)

                  J Offline
                  J Offline
                  John R Shaw
                  wrote on last edited by
                  #8

                  VB6 is dead – I hope. Too may surprise VB.Net is pretty good.

                  INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra

                  1 Reply Last reply
                  0
                  • A Andy Brummer

                    Well, given that they are both VB6...


                    I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon

                    V Offline
                    V Offline
                    Vasudevan Deepak Kumar
                    wrote on last edited by
                    #9

                    Andy Brummer wrote:

                    VB6

                    :mad:

                    Vasudevan Deepak Kumar Personal Homepage Tech Gossips

                    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