Re: [sv-bc] Mantis 0001035: Syntax 8-1 and Table 8-1 misclassifications

From: Geoffrey.Coram <geoffrey.coram_at_.....>
Date: Tue Sep 11 2007 - 04:12:13 PDT
Bresticker, Shalom wrote:
> I've attached a proposal for Mantis 1035.
> Aside from the question of whether 'inside' should be allowed for real 
> operands, are there any problems with it?
> <<1035_D3a.htm>>
> Thanks,
> Shalom

Once you take out tables 11-1 and 11-2, you're left with

> The result of using logical or relational operators on real operands 
> shall be a single-bit scalar value.
> 
> If any operand, except before the ? in the ternary operator, is *real*, 
> the result is *real*. Otherwise, if any operand, except before the ? in
 > the ternary operator, is *shortreal*, the result is *shortreal*.

I believe the second paragraph is meant to apply to all operators
that are not logical nor relational; that is, it applies to the
ternary operator as well as the binary arithmetic operators +-/* etc.
So, I would join these two paragraphs into:

   The result of using logical or relational operators on real operands
   shall be a single-bit scalar value.  For other operators in Table 11-1,
   if any operand, except before the ? in the ternary operator, is *real*,
   the result is *real*. Otherwise, if any operand, except before the ? in
   the ternary operator, is *shortreal*, the result is *shortreal*.

However:
a) if we allow inside for reals, then the paragraph needs to say
that inside gives a single-bit scalar result

b) I'm not sure what it means to say the "result" is real in
cases like this:

integer foo = 5.6;

It seems that the condition "if any operand is real" is true,
but this value is converted to integer per 6.12.2.  (The same
issue applies to += etc.)

-Geoffrey

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Sep 11 04:12:34 2007

This archive was generated by hypermail 2.1.8 : Tue Sep 11 2007 - 04:13:06 PDT