Connect with like-minded education professionals and have your say on the issues that matter to you.
Don't forget to look at the how to guide.
Discussion in 'Personal' started by Vince_Ulam, Sep 20, 2018.
OOOH I like that one
Savile row, of course.
My iterations are offended by this.
I like a row as much as the next man.
I prefer columns.
I am just wondering when this topic will be blackballed by the mods
Needs to be more relevant, such as:
PRINT "I am offended"
UNTIL NOT offended
Adding 1 to each n.
What do we know about the next man?
I prefer sailing.
(Hamlet preferred a scull)
Now we know.
Type it in and see what happens...
No. I reckon I know it will fail.
It is the data that needs 'tuning' first, I suspect
It will fail so there will be adjustments needed. Ideally it will be converted to two distinct classes each operating on some n from somewhere.
I don't know what you lot are on about with the comments about the code.
For starters, you've got a syntax error on the first line:
For n = 1
There's no (necessary) "To such-and-such"
The Next statement is immediately afterwards, so the for-loops ends there. The value of n after that would be whatever the "To..." defined. It would be poor practice to use this value of n though. In C and C++, n would be out of scope at that point in the code (and hence a compile error, at best). Basic is more forgiving, but it's still poor practice.
Then we increment this essentially-undefined value of n. OK, great. So what was the point of the For and Next? That was a rhetorical question, by the way.
Then we've got a Return. For this to make any sense, you'd have to assume that the code in question has just been called from a Gosub. Even if this was indeed the case, it's hardly worth including it in the code snippet.
I welcome all comments on the above. Comments from people who have been offended may very well be filed in my mental "Recycle Bin".
I was wondering if there is a language that would allow that statement. Then Next n would take us out with n = 1 to which 1 is added. Then back to wherever with nothing available. Maybe it's just the start of something: the first strike of a pick in mining bitcoin?