comp.lang.ada
 help / color / mirror / Atom feed
* Unary operator after binary operator: legal or not?
@ 2007-07-30 22:52 Jeffrey R. Carter
  2007-07-30 23:39 ` Markus E.L.
                   ` (2 more replies)
  0 siblings, 3 replies; 40+ messages in thread
From: Jeffrey R. Carter @ 2007-07-30 22:52 UTC (permalink / raw)


Here's something confusing I encountered:

with Ada.Strings.Unbounded;

function Xyz (Left, Right : in Ada.Strings.Unbounded.Unbounded_String)
return String is
    function "+" (Right : in Ada.Strings.Unbounded.Unbounded_String)
    return String renames Ada.Strings.Unbounded.To_String;
begin -- Xyz
    if +Left <= +Right then
       return +Left & +Right;
       --            ^ Error reported here.
    end if;
end Xyz;

A compiler reports "missing operand", referencing the space after the "&".

Why then does it accept the comparison in the previous line? Both are

+Left [binary operator] +Right

-- 
Jeff Carter
"Have you gone berserk? Can't you see that that man is a ni?"
Blazing Saddles
38



^ permalink raw reply	[flat|nested] 40+ messages in thread
* AW: To := Grein, Christoph (Fa. ESG)
@ 2007-08-02 10:17 Grein, Christoph (Fa. ESG)
  0 siblings, 0 replies; 40+ messages in thread
From: Grein, Christoph (Fa. ESG) @ 2007-08-02 10:17 UTC (permalink / raw)
  To: comp.lang.ada

> And for you!  You tried to alter my definition to "+Right was 
> defined as a numeric_literal".  Which shows that you can make 
> mistakes as well. But have you owned up it it?

This was no mistake, it was deliberate :-) my boy.


Eurocopter Deutschland GmbH
Sitz der Gesellschaft/Registered Office: Donauwoerth
Registergericht/Registration Court: Amtsgericht Augsburg HRB 16508
Vorsitzender des Aufsichtsrates/Chairman of the Supervisory Board: Dr. Lutz Bertling
Geschaeftsfuehrung/Board of Management:
Dr. Wolfgang Schoder, Vorsitzender/CEO; Friedrich-Wilhelm Hormel; Ralf Barnscheidt

CONFIDENTIALITY NOTICE 

This communication and the information it contains is intended for the addressee(s) named above and for no other persons or organizations. It is confidential and may be legally privileged and protected by law. The unauthorized use, copying or disclosure of this communication or any part of it is prohibited and may be unlawful. 
If you have received this communication in error, kindly notify us by return e-mail and discard and/or delete the communication. Thank you very much. 
It is possible for e-mails to be intercepted or affected by viruses. Whilst we maintain virus checks on our e-mails, we accept no liability for viruses or other material which might be introduced with this message. 




^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2007-08-03  7:51 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-30 22:52 Unary operator after binary operator: legal or not? Jeffrey R. Carter
2007-07-30 23:39 ` Markus E.L.
2007-07-31  0:22 ` Adam Beneschan
2007-07-31 21:52   ` Jeffrey R. Carter
2007-07-31  8:01 ` anon
2007-07-31  8:16   ` Unary operator after binary operator: legal or not? => Compiler Error anon
2007-07-31  8:38     ` AW: Unary operator after binary operator: legal or not? => CompilerError Grein, Christoph (Fa. ESG)
2007-07-31 15:05     ` Unary operator after binary operator: legal or not? => Compiler Error Robert A Duff
2007-07-31 15:39       ` Dmitry A. Kazakov
2007-07-31 15:53         ` Robert A Duff
2007-07-31 17:02           ` Georg Bauhaus
2007-07-31 19:17             ` Adam Beneschan
2007-08-01  7:16               ` Maciej Sobczak
2007-08-01 15:23                 ` Adam Beneschan
2007-07-31 20:59             ` Robert A Duff
2007-08-01  7:24               ` Georg Bauhaus
2007-08-01  8:02                 ` Dmitry A. Kazakov
2007-08-01  8:17                   ` AW: Unary operator after binary operator: legal or not? => CompilerError Grein, Christoph (Fa. ESG)
2007-08-01 10:10                     ` Ian Clifton
2007-08-01  9:34                   ` Unary operator after binary operator: legal or not? => Compiler Error Georg Bauhaus
2007-08-01 21:51                 ` Jeffrey R. Carter
2007-07-31 17:52           ` Dmitry A. Kazakov
2007-08-02 20:44           ` Charles Lindsey
2007-08-03  7:48             ` Stuart
2007-08-03  7:51             ` Dmitry A. Kazakov
2007-07-31 23:22     ` anon
2007-08-01  0:13       ` Adam Beneschan
2007-08-01  6:20         ` Unary operator after binary operator: legal or not? => Illegal anon
2007-08-01  5:34       ` AW: Unary operator after binary operator: legal or not? => CompilerError Grein, Christoph (Fa. ESG)
2007-08-01  6:46         ` To := Grein, Christoph (Fa. ESG) anon
2007-08-01  7:11           ` AW: " Grein, Christoph (Fa. ESG)
2007-08-02  6:52             ` anon
2007-08-02  8:56               ` AW: " Grein, Christoph (Fa. ESG)
2007-08-02 22:29                 ` Markus E.L. 2
2007-08-02 23:02                   ` tmoran
2007-08-02 23:11                     ` Ed Falis
2007-08-02 23:34                     ` Markus E.L. 2
2007-08-03  4:42                   ` AW: " Grein, Christoph (Fa. ESG)
2007-08-02 22:28               ` Markus E.L. 2
  -- strict thread matches above, loose matches on Subject: below --
2007-08-02 10:17 Grein, Christoph (Fa. ESG)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox