Re: ET_CLASS_CODES 'is_numeric' query error
Eric Bezault <[email protected]> Wed, 10 Jul 2013 23:15:13 +0200
| Newsgroups | gmane.comp.lang.eiffel.gobo.devel |
|---|---|
| Message-ID | <[email protected]> |
On 7/9/2013 9:01 PM, Howard Thomson wrote: > I have just been browsing the classes for the Gobo compiler and note in > the class ET_CLASS_CODES [library/tools/eiffel/ast/misc] that the query > 'is_numeric' is probably erroneous ... > > is_basic (a_code: NATURAL_8): BOOLEAN > -- Does `a_code' correspond to a basic class? > -- > -- Note: a basic class is one of "BOOLEAN", "CHARACTER_8", > -- "CHARACTER_32", "INTEGER_8", "INTEGER_16", "INTEGER_32", > -- "INTEGER_64", "NATURAL_8", "NATURAL_16", "NATURAL_32", > -- "NATURAL_64", "POINTER", "REAL_32", "REAL_64". > do > Result := boolean_class_code <= a_code and a_code <= pointer_class_code > end > > is_numeric (a_code: NATURAL_8): BOOLEAN > -- Does `a_code' correspond to a numeric class? > -- > -- Note: a basic class is one of "INTEGER_8", "INTEGER_16", > -- "INTEGER_32", "INTEGER_64", "NATURAL_8", "NATURAL_16", > -- "NATURAL_32", "NATURAL_64", "REAL_32", "REAL_64". > do > -- Result := boolean_class_code <= a_code and a_code <= pointer_class_code -- Current > Result := integer_8_class_code <= a_code and a_code <= real_64_class_code -- Suggested > end Indeed. Thank you for pointed that out. -- Eric Bezault mailto:[email protected] http://www.gobosoft.com ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk