Il 23/07/2012 15:47, Maarten van Beek ha scritto:
> Indeed I didn't realise negative dates where possible I thought it was
> an error. I'll fix that. However the following code shows the bug:
> 
>         stream := '2011-02-01abcd' readStream.
>         date := Date readFrom: stream.
>         result := stream upToEnd.
> 
>         result printNl.
> 
> The suffix to the date is abcd, so after parsing the date the stream
> should still contain abcd. However result only holds 'bcd'. This is
> not tested in the current test cases. Time, Duration and DateTime have
> the same bug.

Ok, thanks.

> Not being able to use position: is a problem though. When parsing this
> time for example: '09:00::1234' you should read 09:00 as time and
> leave ::1234 in the stream, but you have to look ahead 2 characters to
> notice this.

I think it's safe to consider this example ill-formed, and not care
about it.

Paolo

_______________________________________________
help-smalltalk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to