/[eiffelstudio]/FreeELKS/trunk/library/kernel/integer_8_ref.e
ViewVC logotype

Diff of /FreeELKS/trunk/library/kernel/integer_8_ref.e

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

revision 91476 by ericb, Thu Feb 9 11:21:18 2006 UTC revision 91477 by ericb, Sun Jan 14 09:47:13 2007 UTC
# Line 70  feature -- Access Line 70  feature -- Access
70          ascii_char: CHARACTER is          ascii_char: CHARACTER is
71                          -- Returns corresponding ASCII character to `item' value.                          -- Returns corresponding ASCII character to `item' value.
72                  obsolete                  obsolete
73                          "Use to_character instead"                          "Use to_character_8 instead"
74                  require                  require
75                          valid_character_code: is_valid_character_code                          valid_character_code: is_valid_character_8_code
76                  do                  do
77                          Result := item.to_character                          Result := item.to_character_8
78                  end                  end
79    
80          Min_value: INTEGER_8 is -128          Min_value: INTEGER_8 is -128
# Line 108  feature -- Element change Line 108  feature -- Element change
108    
109  feature -- Status report  feature -- Status report
110    
111          divisible (other: INTEGER_8_REF): BOOLEAN is          divisible (other: like Current): BOOLEAN is
112                          -- May current object be divided by `other'?                          -- May current object be divided by `other'?
113                  do                  do
114                          Result := other.item /= 0                          Result := other.item /= 0
# Line 146  feature -- Status report Line 146  feature -- Status report
146                  end                  end
147    
148          is_valid_character_code: BOOLEAN is          is_valid_character_code: BOOLEAN is
149                            -- Does current object represent a CHARACTER_8?
150                    obsolete
151                            "Use `is_valid_character_8_code' instead."
152                    do
153                            Result := is_valid_character_8_code
154                    end
155    
156            is_valid_character_8_code: BOOLEAN is
157                            -- Does current object represent a CHARACTER_8?
158                    do
159                            Result := item >= {CHARACTER_8}.Min_value and
160                                    item <= {CHARACTER_8}.Max_value
161                    end
162    
163            is_valid_character_32_code: BOOLEAN is
164                          -- Does current object represent a character?                          -- Does current object represent a character?
165                  do                  do
166                          Result := item >= {CHARACTER}.Min_value and item <= {CHARACTER}.Max_value                          Result := item >= 0 and then
167                                    item.to_natural_32 >= {CHARACTER_32}.Min_value and
168                                    item.to_natural_32 <= {CHARACTER_32}.Max_value
169                  end                  end
170    
171  feature -- Basic operations  feature -- Basic operations
# Line 422  feature -- Conversion Line 439  feature -- Conversion
439    
440          to_character: CHARACTER is          to_character: CHARACTER is
441                          -- Returns corresponding ASCII character to `item' value.                          -- Returns corresponding ASCII character to `item' value.
442                    obsolete
443                            "Use `to_character_8' instead."
444                    require
445                            valid_character: is_valid_character_8_code
446                    do
447                            Result := item.to_character_8
448                    end
449    
450            to_character_8: CHARACTER_8 is
451                            -- Associated character in 8 bit version.
452                    require
453                            valid_character: is_valid_character_8_code
454                    do
455                            Result := item.to_character_8
456                    end
457    
458            to_character_32: CHARACTER_32 is
459                            -- Associated character in 32 bit version.
460                  require                  require
461                          valid_character: is_valid_character_code                          valid_character: is_valid_character_32_code
462                  do                  do
463                          Result := item.to_character                          Result := item.to_character_32
464                  end                  end
465    
466  feature -- Bit operations  feature -- Bit operations

Legend:
Removed from v.91476  
changed lines
  Added in v.91477

  ViewVC Help
Powered by ViewVC 1.1.23