|
Well my memory is just fine. What's the issue discussed here again?
Get me coffee and no one gets hurt!
|
|
|
|
|
Slacks? Snacks? Not sure.
Anyway, as I was saying ... where was I?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I find that upsetting
|
|
|
|
|
I think others find it off-putting.
|
|
|
|
|
|
Shouldn't it be "Don't mention the Programmer's Club"?
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Option Base 1.
If you count apples in the grocery story, do you start with "0" apples after taking the first? Even if you do, it would be mathematically incorrect.
'nother question. Do you see fruit as a fruit or a vegetable?
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Of course not, I start at zero before taking the first one, like a normal person.
|
|
|
|
|
So you have no items at index 0?
Do all your arrays contain null at the first entry?
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
I used to, when I first learned BASIC, but not since learning Pascal.
In BASIC, lists (arrays) have always begun at subscript (index) zero, but so many teachers and authors didn't understand that and taught at least three generations of programmers wrong.
https://www.codeproject.com/Uploads/Membership/Uploads/2587207/BASICarray.png[^]
Anyone who still believes that array indices in BASIC begin at one have no excuse for continuing to propagate that fallacy.
A bit of VAX BASIC by way of demonstration:
10 DIM A(4)
20 FOR I = 0 TO 4
21 A ( I ) = I * I
22 NEXT I
30 FOR J = 0 TO 4
31 PRINT A ( J )
32 NEXT J
40 END
Ready
runnh
0
1
4
9
16
Ready
modified 13-Feb-21 13:40pm.
|
|
|
|
|
PIEBALDconsult wrote: Used to, when I first learned BASIC, but not since learning Pascal. Picks up tomato;
"Fruit number one, index 0". I has one items of my list, this item 0.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Yes, but prior to picking it up you had picked up zero of them.
Which spot you place it in in your collection is irrelevant.
|
|
|
|
|
PIEBALDconsult wrote: Which spot you place it in in your collection is irrelevant. It is elephanting. That's the gist of the discussion.
Do you not own shoppingwagon[0]?
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
PIEBALDconsult wrote: A bit of VAX BASIC by way of demonstration: That's still BASIC. Might run on GWBASIC.
Go get me one piece of fruit, say, a cucumber.
And argument is about wether index equals count. It doesn't, obviously.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Eddy Vluggen wrote: That's still BASIC. Might run on GWBASIC.
I never used GWBASIC and Turbo BASIC won't run on Win 10 "TB.EXE is not compatible with the version of Windows you're running."
Eddy Vluggen wrote: argument is about wether index equals count
No, it isn't.
|
|
|
|
|
PIEBALDconsult wrote: I never used GWBASIC and Turbo BASIC won't run on Win 10 Looks like a duck, quacks like a duck.
PIEBALDconsult wrote: No, it isn't. I take your BASIC word for that.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Tar babies and quicksand.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Ah, the empty box where the apples should have been
|
|
|
|
|
It's the first (apple), regardless of the offset (e.g., 0, 1).
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Not regardless of offset.
And you referring to that failed MacIntosh?
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Are you one year old when you're born?
|
|
|
|
|
No, zero; now if your coworkers ask you to order 3 pizza's..
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
And the 11 laws of robotics.
Mircea
|
|
|
|
|
Read the whole thread - decided that everyone made some very good pointers...
If you can't laugh at yourself - ask me and I will do it for you.
|
|
|
|
|
You made me reread the whole thread and then your comment
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|