[clean-list] No unary negative operator?

Arvid Nicolaas arvidn@sci.kun.nl
Tue, 16 Oct 2001 01:43:03 +0200


Hi Jay,

Instead of the "-" use the "~" operator. That's the unary minus operator.
The reason "-" cannot be used both for unary and binary operations is that
Clean doesn't support polymorph operators (or polymorph functions in general
I believe). So another name has to be used for this..

Arvid


----- Original Message -----
From: "Jay Kint" <jean-luc-picard@ussenterprise.com>
To: <clean-list@cs.kun.nl>
Sent: Tuesday, October 16, 2001 1:41 AM
Subject: Re: [clean-list] No unary negative operator?


> I should clarify.  That didn't make too much sense.  The exact error is:
> "- first argument of infix operator missing"
>
> Jay
>
> ----- Original Message -----
> From: "Jay Kint" <jean-luc-picard@ussenterprise.com>
> To: <clean-list@cs.kun.nl>
> Sent: Monday, October 15, 2001 5:03 PM
> Subject: [clean-list] No unary negative operator?
>
>
> > Am I to understand that there is no unary negative operator unless it is
> > followed by a constant?  Is this just broken or am I missing something?
> The
> > following doesn't compile complaining that the other operator is
missing.
> >
> > Pi :: Real
> > Pi = 3.14159
> >
> > Start :: Real
> > Start = sin(-Pi)
> >
> > Jay
> >
> >
> > _______________________________________________
> > clean-list mailing list
> > clean-list@cs.kun.nl
> > http://www.cs.kun.nl/mailman/listinfo/clean-list
> >
>
>
> _______________________________________________
> clean-list mailing list
> clean-list@cs.kun.nl
> http://www.cs.kun.nl/mailman/listinfo/clean-list
>