On Tue, 2003-02-25 at 20:43, Frank Heckenbach wrote:
Richard D. Jackson wrote:
When trying to use the Stringutils unit I've run into a issue. In that how do you determin the number of strings returned from the Tokenize funcions?
For instance TokenizeString returns PPStrings but does not use a nil sentinal at the end of the array of strings. So with out the use of a nil sentinal how do you find out how many strings are being returned?
Just look at the type declaration (in gpc.pas):
type { `+ 1' is a waste, but it is so the size of the array is not zero for Count = 0 } PPStrings = ^TPStrings; TPStrings (Count: Cardinal) = array [1 .. Count + 1] of PString;
So there's `Count'.
The EP Schemata stuf is new to me so it did not register when I did look at the declaration. But when you pointed it out the light came on and I went this is neat as it can be used to solve many things in a much cleaner way. I wonder why Delphi doesn't support this.
Oh well thanks for the enlightenment :) I guess I should really be asking these types of questions over on the iso news group verses here though.
Richard