Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Who invented the zero based
Message
From
24/11/2011 09:16:34
 
 
To
24/11/2011 09:04:26
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01529748
Message ID:
01529749
Views:
97
>I've been thinking about this this morning. Who invented the zero based approach, which applies to a lot of things in several development environments, including, among others, .NET. This is always a waste of time trying to understand/find which one applies to a specific component. I mean, when I start counting, I start at 1, right? lol


Has been there at least since C - which must be the seventies

Think of zero based as an offset

It does have its advantages. If you start counting from zero, the address where element n starts is the startAddress + n * widthOfElement

For one based it would be startAddress + ( n-1) * widthOfElement

Zero based : for 0 to count-1
One based : for 1 to count
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform