Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using == vs =
Message
De
15/11/2015 21:09:01
 
 
À
14/11/2015 10:38:36
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01627149
Message ID:
01627475
Vues:
72
>>>>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.

And then we have the lovely example of staring with one... 1 C.E. is preceded by 1 B.C.E. -- and as a result, computation of time passed between C.E. and B.C.E. will need to be handled as a special case.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform