Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using == vs =
Message
From
14/11/2015 10:38:36
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
14/11/2015 08:10:52
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01627149
Message ID:
01627431
Views:
52
>>>That's interesting logic, Fabio and it probably is what the people who wrote the language had in mind.
>>>However when someone asks "What does 'ABC' begin with?", I will continue to answer "A", not "nothing."
>>
>>How about zero-based arrays? To the question "with which element does the array begin" you'd have to say "zeroeth", IOW, the nothingth.
>>
>
>Which is exactly why zero-based anything makes no sense. It's a hang over from the early days of cybernetics when bits were precious and no one wanted to waste a zero bit in addressing memory so they used it to address the first location.
>
>Suppose the first child in every family's name was "".
>That would make as much sense as zero-based addressing.

Zero based address is the answer to "how many positions away from the start", not "which one". So your analogy is a bit flawed.

And it's not about storage, it's about how one calculates the position. It's start+ElementLength*i, so if i=0 you get the one which is exactly at the start. Making this one-based would require that a three element array holds four positions, i.e. it would waste the first (ahem, zeroeth). Or it would have to make a copy of the parameter, decrease it by one (b'cause it was creased :) and then use it in the above formula. which is probably what one-based systems do.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform