--* From SMWATT%WATSON.vnet.ibm.com@yktvmh.watson.ibm.com  Thu May 26 16:05:18 1994
--* Received: from yktvmh.watson.ibm.com by asharp.watson.ibm.com (AIX 3.2/UCB 5.64/930311)
--*           id AA21505; Thu, 26 May 1994 16:05:18 -0400
--* Received: from watson.vnet.ibm.com by yktvmh.watson.ibm.com (IBM VM SMTP V2R3)
--*    with BSMTP id 1211; Thu, 26 May 94 16:05:23 EDT
--* Received: from YKTVMH by watson.vnet.ibm.com with "VAGENT.V1.0"
--*           id <A.SMWATT.NOTE.VAGENT2.6170.May.26.16:05:07.-0400>
--*           for asbugs@watson; Thu, 26 May 94 16:05:23 -0400
--* Received: from YKTVMH by watson.vnet.ibm.com with "VAGENT.V1.0"
--*           id 6123; Thu, 26 May 1994 16:05:06 EDT
--* Received: from spadserv.watson.ibm.com by yktvmh.watson.ibm.com
--*    (IBM VM SMTP V2R3) with TCP; Thu, 26 May 94 16:03:50 EDT
--* Received: by spadserv.watson.ibm.com (AIX 3.2/UCB 5.64/900524)
--*           id AA23158; Thu, 26 May 1994 16:05:58 -0400
--* Date: Thu, 26 May 1994 16:05:58 -0400
--* From: smwatt@spadserv.watson.ibm.com (Stephen Watt)
--* X-External-Networks: yes
--* Message-Id: <9405262005.AA23158@spadserv.watson.ibm.com>
--* To: jenks@watson.ibm.com, santas@inf.ethz.ch, smwatt@watson.ibm.com
--* Subject: Re:  4 + - . 5
--* Cc: asbugs@watson.ibm.com, bronstei@inf.ethz.ch, williams@inf.ethz.ch

--@ Fixed  by:  SSD   Thu Jun 2 16:57:15 EDT 1994 
--@ Tested by:  none 
--@ Summary:    Not a bug. 


> From root Thu May 26 15:07:05 1994
> Received: from yktvmv-ob.watson.ibm.com by spadserv.watson.ibm.com (AIX 3.2/UCB 5.64/900524)
>           id AA19937; Thu, 26 May 1994 15:07:04 -0400
> X-External-Networks: yes
> From: Philip Santas <santas@inf.ethz.ch>
> Date: Thu, 26 May 1994 20:30:54 +0200
> To: smwatt@watson.ibm.com, jenks@watson.ibm.com
> Subject: 4 + - . 5
> Cc: asbugs@watson.ibm.com, bronstei@inf.ethz.ch, williams@inf.ethz.ch
>
> Some problems with dots and infix operators which are somtimes
> prefix (like -, +):
>
> 1)
>
> print( - . 5 )()
>
> results in syntax error in A#.
> This must be a bug.
> For instance:
>
> 4 + - . 5
> should return
> -1
>
>
> 2)
>
> f.4.5
> is not the same as
> f. 4 . 5
> since the former is f applied to a float.
> (these have to be documented, or the dot application to be
> refined somehow).
>
> I do not know how B# handles these cases.
>
> Philip


Hi Philip, thanks for the note.

On (1), yes this is a little tricky.
Infixed operators must be enclosed in parentheses when given
as arguments to other infixed keywords:

E.g. Given *: (T->T,T->T) -> (T->T)
then you use    (-)*abs    and NOT   -*abs

So - . 5 is correctly a syntax error, you should write (-).5.
Note that  - .5  is minus one half.

On (2), f.4.5  and  f. 4 . 5  are exactly the same in A#.
You can use "asharp -WTrt+abnorm"  to see this.

-- Stephen
 
