bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: Bug in NSScanner ?


From: Manuel Guesdon
Subject: Re[2]: Bug in NSScanner ?
Date: Wed, 19 Feb 2003 19:52:49 +0100 (CET)

On Wed, 19 Feb 2003 10:41:52 +0000 Richard Frith-Macdonald 
<richard@brainstorm.co.uk> wrote:
 >| After you scan the word 'MUST', you then tell the scanner to scan up to 
 >| a space .... but a space is in the set of characters to be skipped, and 
 >| the MacOS-X documentation of -charactersToBeSkipped says that behavior 
 >| in this case is undefined.  In fact the GNUstep behavior is 
 >| well-defined ... characters from this set are always skipped before 
 >| scanning starts, even if you are scanning for something thsst is in the 
 >| set.
 >| The scan location is at a space (which is skipped) then everything up 
 >| to the next space is scanned, leaving the scan location at the space 
 >| immediately before 'MAY'
 >| 
 >| Next you say to scan up to 'MAY' ... so the space at the scan location 
 >| is skipped, then the scanner encounters 'MAY', so no characters are 
 >| scanned and the method returns NO.
 >| 
 >| You use this return status to decide whether to scan in 'MAY', and 
 >| because it is NO you don't scan it in.
 >| 
 >| So ... it's all working as documented ... and I believe this is also 
 >| how MacOS-X works.

Thank you for the explanation ! I've found a way to work around this.

Manuel
--
______________________________________________________________________
Manuel Guesdon - ORANGE CONCEPT <mguesdon@orange-concept.com>
14 rue Jean-Baptiste Clement  -  93200 Saint-Denis  -  France
Tel: +33 1 4940 0997  -  Fax: +33 1 4940 0998





reply via email to

[Prev in Thread] Current Thread [Next in Thread]