#### [Tue, Dec 04, 2001 at 01:28:40PM +0000: Simon Cozens] > On Tue, Dec 04, 2001 at 01:31:34AM -0000, [EMAIL PROTECTED] wrote: > > Added length parameter to extract_num and extract_int string vtables, > > without this it would be impossible to have strings with nulls in while > > still knowing where they ended. > > This can't be right, can it? Isn't that exactly the problem that STRING* > fixes? >
Sorry, not clear enough. The encoding needs to know how long the string is, else it can't work out where to stop, string.c (aka STRING *) tells the encoding this. No one else gets to find out, nothing to see here, move along now. FLOATVAL string_to_num (struct Parrot_Interp *interpreter, STRING *s) { if (s == NULL) { return 0.0; } else { return s->encoding->extract_num(s->bufstart, s->bufused); } } Alex Gough -- I can't understand why people are frightened of new ideas. I'm frightened of old ones.