/[classpath]/classpath/java/text/ChoiceFormat.java
ViewVC logotype

Diff of /classpath/java/text/ChoiceFormat.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by brawer, Tue Apr 30 13:57:08 2002 UTC revision 1.8 by tromey, Tue Jul 2 19:40:35 2002 UTC
# Line 1  Line 1 
1  /* ChoiceFormat.java -- Format over a range of numbers  /* ChoiceFormat.java -- Format over a range of numbers
2     Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.     Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 259  public class ChoiceFormat extends Number Line 259  public class ChoiceFormat extends Number
259      if (choiceLimits.length == 0)      if (choiceLimits.length == 0)
260        return appendBuf;        return appendBuf;
261    
262      int index =  0;      int index = 0;
263      if (! Double.isNaN(num) && num >= choiceLimits[0])      if (! Double.isNaN(num) && num >= choiceLimits[0])
264        {        {
265          for (; index < choiceLimits.length - 1; ++index)          for (; index < choiceLimits.length - 1; ++index)
266            {            {
267              if (choiceLimits[index] <= num              if (choiceLimits[index] <= num && num < choiceLimits[index + 1])
                 && index != choiceLimits.length - 2  
                 && num < choiceLimits[index + 1])  
268                break;                break;
269            }            }
270        }        }

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26