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. Conversion logic

Conversion logic

Scheduled Pinned Locked Moved The Weird and The Wonderful
csharpcomdesign
4 Posts 3 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.
  • J Offline
    J Offline
    Jeroen De Dauw
    wrote on last edited by
    #1

    I don't have the exact code, but a while ago I've seen someone do something like this in VB.Net:

    sub codeHorror()

    dim amount as integer
    dim isTrue as boolean

    amount = cint(textbox1.text)
    ' some unrelated code
    isTrue = cbool(amount)
    ' Some unrelated code
    amount = cint(isTrue)

    messagebox.show(cstr(amount))

    end sub

    The person who did this had little experience with coding, but had done application design on paper (with PST'z) for almost half a year - proof of my school failing at teaching logically.

    GSoC 2009 student for SMW! --- My little forums: http://code.bn2vs.com --- 70 72 6F 67 72 61 6D 6D 69 6E 67 20 34 20 6C 69 66 65!

    S 1 Reply Last reply
    0
    • J Jeroen De Dauw

      I don't have the exact code, but a while ago I've seen someone do something like this in VB.Net:

      sub codeHorror()

      dim amount as integer
      dim isTrue as boolean

      amount = cint(textbox1.text)
      ' some unrelated code
      isTrue = cbool(amount)
      ' Some unrelated code
      amount = cint(isTrue)

      messagebox.show(cstr(amount))

      end sub

      The person who did this had little experience with coding, but had done application design on paper (with PST'z) for almost half a year - proof of my school failing at teaching logically.

      GSoC 2009 student for SMW! --- My little forums: http://code.bn2vs.com --- 70 72 6F 67 72 61 6D 6D 69 6E 67 20 34 20 6C 69 66 65!

      S Offline
      S Offline
      Samer Aburabie
      wrote on last edited by
      #2

      You know ... sometimes I think that the compiler should'nt compile such a code !! and display a message for the developer :"For God Sake What with the hell is that !!!" :)

      Sincerely Samer Abu Rabie Imagination is more important than knowledge !

      P 1 Reply Last reply
      0
      • S Samer Aburabie

        You know ... sometimes I think that the compiler should'nt compile such a code !! and display a message for the developer :"For God Sake What with the hell is that !!!" :)

        Sincerely Samer Abu Rabie Imagination is more important than knowledge !

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

        Paperclip: I see that you are trying to... (scratches head) what exactly are you trying to do?

        S 1 Reply Last reply
        0
        • P PIEBALDconsult

          Paperclip: I see that you are trying to... (scratches head) what exactly are you trying to do?

          S Offline
          S Offline
          Samer Aburabie
          wrote on last edited by
          #4

          :laugh:

          Sincerely Samer Abu Rabie Imagination is more important than knowledge !

          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