comp.lang.ada
 help / color / mirror / Atom feed
From: "David N. Maez" <sellout@dharmadevil.com>
Subject: Bitwise XOR?
Date: Thu, 02 Oct 2003 01:35:15 GMT
Date: 2003-10-02T01:35:15+00:00	[thread overview]
Message-ID: <nhLeb.476768$Oz4.309292@rwcrnsc54> (raw)

I'm new to Ada, and I'm wondering what the bitwise (not logical) Exclusive
Or function is?
Using Gnat, this fails to compile:

with Ada.Text_IO; use Ada.Text_IO;
procedure foobar is
  x : integer;
  y : integer;
begin
  x := 12;
  y := 23;
  x := x xor y;
  put_line(x'img);
end foobar;

Gnat complains:
foobar.adb:9:10: invalid operand types for operator "xor"
foobar.adb:9:10: left operand has type "Standard.integer"
foobar.adb:9:10: right operand has type "Standard.integer"

What am I missing?





             reply	other threads:[~2003-10-02  1:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-02  1:35 David N. Maez [this message]
2003-10-02  2:03 ` Bitwise XOR? sk
2003-10-02  9:01   ` John McCabe
2003-10-02  8:30 ` Adrian Knoth
2003-10-02 12:46   ` Marin David Condic
2003-10-02 12:53     ` Adrian Knoth
2003-10-02 18:15     ` Jeffrey Carter
2003-10-03 12:26       ` Marin David Condic
2003-10-03 20:32         ` Jeffrey Carter
2003-10-03 22:41           ` Marin David Condic
2003-10-03  3:14   ` Steve
  -- strict thread matches above, loose matches on Subject: below --
2003-10-03 10:28 Beard, Frank Randolph CIV
2003-10-04  2:57 ` Steve
2003-10-04  3:07 ` Robert I. Eachus
replies disabled

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