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. GOSUB .NET

GOSUB .NET

Scheduled Pinned Locked Moved The Weird and The Wonderful
csharp
12 Posts 8 Posters 21 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.
  • Z Zeeshan Ejaz Bhatti

    i am converting code in basic language from CASIO FX 880P, blindly into vb.net CF... guess what, vb.net doesnt support the GOSUB statement anymore.. many gosub statements in the source code perform recurrsions... if i cud only find the starting end of this noodle.. hmmmm

    All Rights Reserved! All Wrongs Revenged!

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

    This forum is not a place to ask for help to a problem, but rather discuss what programming horror you have run across and how you fixed it/avoided it (note the past tense here). Try the programming forums for programming questions/problems :) As far as gosub is concerned, you have to take the code that is referenced by the gosub and refactor it into a procedure. Then, call the procedure. Just a bit of code converting ahead for you :)

    "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

    Z realJSOPR 2 Replies Last reply
    0
    • P Paul Conrad

      This forum is not a place to ask for help to a problem, but rather discuss what programming horror you have run across and how you fixed it/avoided it (note the past tense here). Try the programming forums for programming questions/problems :) As far as gosub is concerned, you have to take the code that is referenced by the gosub and refactor it into a procedure. Then, call the procedure. Just a bit of code converting ahead for you :)

      "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

      Z Offline
      Z Offline
      Zeeshan Ejaz Bhatti
      wrote on last edited by
      #4

      "whats with men and asking directions?" Finding Nemo.. I am to egoistic to ask for help :) .. i was just sharing one of my worst experiences.. besides how wud you refactor a recurrsion? specially when all the variables are just capital alphabets? IF A>1E99 THEN GOSUB#0 HOW I MANAGED TO WORK AROUND i executed the code on the calculator (Since i am not aware of any simulator for fx880p), used the STOP button on the calculator (since there are no breakpoints in fx880p) and drew a control flow diagram (estimated).. then i had to copy some lines of code into several sub procedures (cons of noodle programming) most of the times, plucking out independent section of LOCs into a sperate function was easy ... some times it was impossible .. i yet have to test the application but as the the saying goes Testing can be used to prove the presence of errors in a software, but not to prove thier absence... (i think dijkstra said/implied it) P.S. i used PRESENT TENSE bcz i was still working on the same project not bcz i am PRESENTLY TENSE (and thus need help).. :)

      All Rights Reserved! All Wrongs Revenged!

      P M 2 Replies Last reply
      0
      • Z Zeeshan Ejaz Bhatti

        "whats with men and asking directions?" Finding Nemo.. I am to egoistic to ask for help :) .. i was just sharing one of my worst experiences.. besides how wud you refactor a recurrsion? specially when all the variables are just capital alphabets? IF A>1E99 THEN GOSUB#0 HOW I MANAGED TO WORK AROUND i executed the code on the calculator (Since i am not aware of any simulator for fx880p), used the STOP button on the calculator (since there are no breakpoints in fx880p) and drew a control flow diagram (estimated).. then i had to copy some lines of code into several sub procedures (cons of noodle programming) most of the times, plucking out independent section of LOCs into a sperate function was easy ... some times it was impossible .. i yet have to test the application but as the the saying goes Testing can be used to prove the presence of errors in a software, but not to prove thier absence... (i think dijkstra said/implied it) P.S. i used PRESENT TENSE bcz i was still working on the same project not bcz i am PRESENTLY TENSE (and thus need help).. :)

        All Rights Reserved! All Wrongs Revenged!

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

        digitals2002 wrote:

        i was just sharing one of my worst experiences..

        Okay :-D

        digitals2002 wrote:

        how wud you refactor a recurrsion?

        Very carefully :rolleyes:

        digitals2002 wrote:

        All Rights Reserved! All Wrongs Revenged!

        :laugh: I like that :)

        "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

        1 Reply Last reply
        0
        • Z Zeeshan Ejaz Bhatti

          "whats with men and asking directions?" Finding Nemo.. I am to egoistic to ask for help :) .. i was just sharing one of my worst experiences.. besides how wud you refactor a recurrsion? specially when all the variables are just capital alphabets? IF A>1E99 THEN GOSUB#0 HOW I MANAGED TO WORK AROUND i executed the code on the calculator (Since i am not aware of any simulator for fx880p), used the STOP button on the calculator (since there are no breakpoints in fx880p) and drew a control flow diagram (estimated).. then i had to copy some lines of code into several sub procedures (cons of noodle programming) most of the times, plucking out independent section of LOCs into a sperate function was easy ... some times it was impossible .. i yet have to test the application but as the the saying goes Testing can be used to prove the presence of errors in a software, but not to prove thier absence... (i think dijkstra said/implied it) P.S. i used PRESENT TENSE bcz i was still working on the same project not bcz i am PRESENTLY TENSE (and thus need help).. :)

          All Rights Reserved! All Wrongs Revenged!

          M Offline
          M Offline
          megaadam
          wrote on last edited by
          #6

          So, if you want recursion what is wrong with this: if( a < fSomeValue ) ThisFunction(); And really, listening to your hardships is painful. Why not rewrite the whole thing instead? Really! The rewrite might take longer, but debugging time would be shorter, and your code would be one helluva lot easier to manage in the future.

          _____________________________________ Action without thought is not action Action without emotion is not life

          1 Reply Last reply
          0
          • P Paul Conrad

            This forum is not a place to ask for help to a problem, but rather discuss what programming horror you have run across and how you fixed it/avoided it (note the past tense here). Try the programming forums for programming questions/problems :) As far as gosub is concerned, you have to take the code that is referenced by the gosub and refactor it into a procedure. Then, call the procedure. Just a bit of code converting ahead for you :)

            "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

            realJSOPR Offline
            realJSOPR Offline
            realJSOP
            wrote on last edited by
            #7

            Paul Conrad wrote:

            This forum is not a place to ask for help to a problem, but rather discuss what programming horror you have run across

            If using GOSUB doesn't meet the definition of "coding horror", I don't know what does.

            "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
            -----
            "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

            B P 2 Replies Last reply
            0
            • realJSOPR realJSOP

              Paul Conrad wrote:

              This forum is not a place to ask for help to a problem, but rather discuss what programming horror you have run across

              If using GOSUB doesn't meet the definition of "coding horror", I don't know what does.

              "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
              -----
              "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

              B Offline
              B Offline
              BadKarma
              wrote on last edited by
              #8

              John Simmons / outlaw programmer wrote:

              If using GOSUB doesn't meet the definition of "coding horror", I don't know what does.

              I guess you have the same feelings towards the use of a nice little goto in c/c++ code. This lovely keyword is already one of the most unapreciated keywords in the language :sigh: Surely you can't consider __asm jmp some_lable; as coding horror.

              codito ergo sum

              realJSOPR 1 Reply Last reply
              0
              • B BadKarma

                John Simmons / outlaw programmer wrote:

                If using GOSUB doesn't meet the definition of "coding horror", I don't know what does.

                I guess you have the same feelings towards the use of a nice little goto in c/c++ code. This lovely keyword is already one of the most unapreciated keywords in the language :sigh: Surely you can't consider __asm jmp some_lable; as coding horror.

                codito ergo sum

                realJSOPR Offline
                realJSOPR Offline
                realJSOP
                wrote on last edited by
                #9

                Any assembly language is a coding horror (just like any flavor of VB you might happen to mention). :)

                "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                -----
                "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                P 1 Reply Last reply
                0
                • realJSOPR realJSOP

                  Any assembly language is a coding horror (just like any flavor of VB you might happen to mention). :)

                  "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                  -----
                  "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

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

                  John Simmons / outlaw programmer wrote:

                  Any assembly language is a coding horror

                  Awww, come on :->

                  John Simmons / outlaw programmer wrote:

                  any flavor of VB you might happen to mention

                  Yep...

                  "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

                  1 Reply Last reply
                  0
                  • realJSOPR realJSOP

                    Paul Conrad wrote:

                    This forum is not a place to ask for help to a problem, but rather discuss what programming horror you have run across

                    If using GOSUB doesn't meet the definition of "coding horror", I don't know what does.

                    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                    -----
                    "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                    P Offline
                    P Offline
                    Pascal Ganaye
                    wrote on last edited by
                    #11

                    I suppose ON x GOSUB sub1, sub2, sub3 is worse.

                    L 1 Reply Last reply
                    0
                    • P Pascal Ganaye

                      I suppose ON x GOSUB sub1, sub2, sub3 is worse.

                      L Offline
                      L Offline
                      Lutoslaw
                      wrote on last edited by
                      #12

                      Don't remind me THAT... Please?

                      Greetings - Gajatko

                      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