You know you're in for a bad day of programming when....
You arnt allowed to write a line of code until you've produced a flowchart of your program
You know you're in for a bad day of programming when....
You arnt allowed to write a line of code until you've produced a flowchart of your program
I would think basic would be a rather bad choice for teaching as its not structured
I started with ms quick pascal, loved it actually
I would think basic would be a rather bad choice for teaching as its not structured
I started with ms quick pascal, loved it actually
You mean it's good? (based on the the logic "The enemy of my enemy is my friend")GOTO is the bane of all evil.
You mean it's good? (Using the logic "The enemy of my enemy is my friend")
They can be useful to make code clearer when (assuming C/C++) 'break' just won't do the job.Oops, I mean to say bane of all that is good and holy! GOTO is evil, evil, kill it already!
We had to get rid of that one as the wall was starting to crack.What does someone have to do for you to loan out the +5?
They can be useful to make code clearer when (assuming C/C++) 'break' just won't do the job.
For example,
- You have a critical loop (and I do mean critical) that contains a switch statement and one of the options indicates that you must terminate that loop, or
- when you need to break exit out of a doubly/triply nested loop
I guess the reason why I dislike GOTO so much is because when I was learning BASIC with my Speccy I did a program that implemented Aristoteles' dichotomy for Biology classification and because of the limitations of the language I had to write a LOT of GOTOs and label everything properly. Needless to say, debugging was a nightmare when a horse started getting classified as a species of insect.
You had labels to GOTO ? You were lucky! We only had linenumbers on the C64!
Cheers
Because there was more code after the loop.Any particular reason why an early return won't work better?
Jumping outside of a function? If I started thinking about that I'd begin applying the "Mallet of Enlightenment +1©" to myself .What are your thoughts on setjmp / longjmp or sigsetjmp / siglongjmp (s) ?
Lines numbers on Speccy too; which was a pain when we had to refactor code "above" - as you are no doubt alluding to! The expression spaghetti code doesn't convey the appropriate head-on-monitor experience.
Exactly!!! having to inject 25 lines of code between line 95 and 100 is one of
Cheers
Back in <cough> I only had access to a disassembler built in to the Apple][ ROM and so inserting code was a nasty issue.the reasons I started programming assembler 6 months after getting my C64.