ET_CLASS_CODES 'is_numeric' query error

Howard Thomson <[email protected]> Tue, 09 Jul 2013 20:01:54 +0100
Newsgroups gmane.comp.lang.eiffel.gobo.devel
Message-ID <1373396514.2591.132.camel@ht-laptop>
Hi,

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

Regards,

Howard



------------------------------------------------------------------------------
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