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. Reassuring?

Reassuring?

Scheduled Pinned Locked Moved The Weird and The Wonderful
comdata-structurestestingtoolsquestion
9 Posts 6 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 Offline
    P Offline
    Prerak Patel
    wrote on last edited by
    #1

    If c is blank do nothing, but still if c is blank, output blank array!!:wtf: Changing mind while coding!? and it is VBS:doh:

    Function e1(c,outv)
    ReDim outv(anc-1)
    If c="" Then
    Else
    If c="" Then

    For i=0 To ubound(outv)
    outv(i)=""
    Next
    Else
    x1=split(c,",")
    For i=0 To ubound(x1)
    If i<=ubound(outv) Then outv(i)=x1(i)
    Next
    End If
    End If
    End Function

    Yes, I made it. Here is my first article. Please vote it if you find it helpful. Automation tool for web activities[^]

    R J F R E 5 Replies Last reply
    0
    • P Prerak Patel

      If c is blank do nothing, but still if c is blank, output blank array!!:wtf: Changing mind while coding!? and it is VBS:doh:

      Function e1(c,outv)
      ReDim outv(anc-1)
      If c="" Then
      Else
      If c="" Then

      For i=0 To ubound(outv)
      outv(i)=""
      Next
      Else
      x1=split(c,",")
      For i=0 To ubound(x1)
      If i<=ubound(outv) Then outv(i)=x1(i)
      Next
      End If
      End If
      End Function

      Yes, I made it. Here is my first article. Please vote it if you find it helpful. Automation tool for web activities[^]

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

      I think examples like this provide an argument for making programming languages inherently complex - that way people would really have to learn their craft and it may weed out some of the f*wits who write this kind of drivel.

      1 Reply Last reply
      0
      • P Prerak Patel

        If c is blank do nothing, but still if c is blank, output blank array!!:wtf: Changing mind while coding!? and it is VBS:doh:

        Function e1(c,outv)
        ReDim outv(anc-1)
        If c="" Then
        Else
        If c="" Then

        For i=0 To ubound(outv)
        outv(i)=""
        Next
        Else
        x1=split(c,",")
        For i=0 To ubound(x1)
        If i<=ubound(outv) Then outv(i)=x1(i)
        Next
        End If
        End If
        End Function

        Yes, I made it. Here is my first article. Please vote it if you find it helpful. Automation tool for web activities[^]

        J Offline
        J Offline
        Jeroen De Dauw
        wrote on last edited by
        #3

        What's the licence? Can I use this in my own production code?

        Jeroen De Dauw
        Blog ; Wiki

        1 Reply Last reply
        0
        • P Prerak Patel

          If c is blank do nothing, but still if c is blank, output blank array!!:wtf: Changing mind while coding!? and it is VBS:doh:

          Function e1(c,outv)
          ReDim outv(anc-1)
          If c="" Then
          Else
          If c="" Then

          For i=0 To ubound(outv)
          outv(i)=""
          Next
          Else
          x1=split(c,",")
          For i=0 To ubound(x1)
          If i<=ubound(outv) Then outv(i)=x1(i)
          Next
          End If
          End If
          End Function

          Yes, I made it. Here is my first article. Please vote it if you find it helpful. Automation tool for web activities[^]

          F Offline
          F Offline
          fjdiewornncalwe
          wrote on last edited by
          #4

          I think the horror may be that "anc" hasn't been defined and the code won't even get to the horror you mention... :)

          I wasn't, now I am, then I won't be anymore.

          P 1 Reply Last reply
          0
          • P Prerak Patel

            If c is blank do nothing, but still if c is blank, output blank array!!:wtf: Changing mind while coding!? and it is VBS:doh:

            Function e1(c,outv)
            ReDim outv(anc-1)
            If c="" Then
            Else
            If c="" Then

            For i=0 To ubound(outv)
            outv(i)=""
            Next
            Else
            x1=split(c,",")
            For i=0 To ubound(x1)
            If i<=ubound(outv) Then outv(i)=x1(i)
            Next
            End If
            End If
            End Function

            Yes, I made it. Here is my first article. Please vote it if you find it helpful. Automation tool for web activities[^]

            R Offline
            R Offline
            RobCroll
            wrote on last edited by
            #5

            It's not all bad. At least the function doesn't need obfuscating :laugh:

            Architecture is extensible, code is minimal.

            P 1 Reply Last reply
            0
            • R RobCroll

              It's not all bad. At least the function doesn't need obfuscating :laugh:

              Architecture is extensible, code is minimal.

              P Offline
              P Offline
              Prerak Patel
              wrote on last edited by
              #6

              Obfuscating VBS?! I never thought that. :doh: ;P

              Yes, I made it. Here is my first article. Please vote it if you find it helpful. Automation tool for web activities[^]

              1 Reply Last reply
              0
              • F fjdiewornncalwe

                I think the horror may be that "anc" hasn't been defined and the code won't even get to the horror you mention... :)

                I wasn't, now I am, then I won't be anymore.

                P Offline
                P Offline
                Prerak Patel
                wrote on last edited by
                #7

                "anc" is atleast defined outside. ;)

                Yes, I made it. Here is my first article. Please vote it if you find it helpful. Automation tool for web activities[^]

                F 1 Reply Last reply
                0
                • P Prerak Patel

                  If c is blank do nothing, but still if c is blank, output blank array!!:wtf: Changing mind while coding!? and it is VBS:doh:

                  Function e1(c,outv)
                  ReDim outv(anc-1)
                  If c="" Then
                  Else
                  If c="" Then

                  For i=0 To ubound(outv)
                  outv(i)=""
                  Next
                  Else
                  x1=split(c,",")
                  For i=0 To ubound(x1)
                  If i<=ubound(outv) Then outv(i)=x1(i)
                  Next
                  End If
                  End If
                  End Function

                  Yes, I made it. Here is my first article. Please vote it if you find it helpful. Automation tool for web activities[^]

                  E Offline
                  E Offline
                  Euhemerus
                  wrote on last edited by
                  #8

                  What I find deeply disturbing by this and other examples of bad coding is that these people get paid for writing this rubbish. Furthermore, what is more frightening is the fact that they could be writing code for safety systems or banking systems or who knows what else. No bloody wonder the software industry puts a NO WARRANTIES EXPRESSED OR IMPLIED notice into every EULA :doh: They're not even sure it's going to work. Can you imagine buying a new car and the manufacturer said that there were no warranties?

                  Nobody can get the truth out of me because even I don't know what it is. I keep myself in a constant state of utter confusion. - Col. Flagg

                  1 Reply Last reply
                  0
                  • P Prerak Patel

                    "anc" is atleast defined outside. ;)

                    Yes, I made it. Here is my first article. Please vote it if you find it helpful. Automation tool for web activities[^]

                    F Offline
                    F Offline
                    fjdiewornncalwe
                    wrote on last edited by
                    #9

                    At least that part is reassuring. :)

                    I wasn't, now I am, then I won't be anymore.

                    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