RE: 0-based Indexing
- Posted by gertie at visionsix.com Jul 17, 2003
- 454 views
On 17 Jul 2003, at 6:32, Matt Lewis wrote: > > > > From: gertie at visionsix.com [mailto:gertie at visionsix.com] > <snip> > > BASIC and Pascal used the first byte as length. (It feels odd > > that RobC would use an example from Basic, and still not > > implement CASE and GOTO.) So the string storage data did > > actually start at zero offset, but not the string itself. > > Naturally my gripe with Turbo Pascal is that it began a move > > to C strings, so one could not store a null in byte in the > > string. But then, DOS frowned on that too. > > Actually, the BSTR (basic string--as used by VB and COM and prolly others, > too) stores the length of the string in the four bytes preceding the data, > but the pointer to the string points to the data. Also, the string is > unicode. "used" , as in past tense. Kat