comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison <dennison@telepath.com>
Subject: Re: defining functions
Date: 1999/11/24
Date: 1999-11-24T00:00:00+00:00	[thread overview]
Message-ID: <81hbf1$6fb$1@nnrp1.deja.com> (raw)
In-Reply-To: 81gthb$kej$1@bunyip.cc.uq.edu.au

In article <81gthb$kej$1@bunyip.cc.uq.edu.au>,
  "Riyaz Mansoor" <s800032@student.uq.edu.au> wrote:

> when i try to define a function as below my compiler tells me the name
> is invalid. when i change the name to "=" it works fine. is this a
> compiler specific problem? or ada restriction?
>
>    function  "=="  (Stack1, Stack2 : in Stack) return Boolean;

No. You do not get to create your own binary operators with any series
of random characters you choose. You are restricted to the ones the
language provides. I was a smidge diappointed when I first figured that
out myself.

> anyway i can tell the compiler to accept "==" as a valid name?
No. You'll have to stick to Ada/Pascal/Modula/Oberon syntax for equality
and assignment. Sorry.

But on the bright side, you'll make less compilable typos this way.

--
T.E.D.


Sent via Deja.com http://www.deja.com/
Before you buy.




  reply	other threads:[~1999-11-24  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-25  0:00 defining functions Riyaz Mansoor
1999-11-24  0:00 ` Ted Dennison [this message]
1999-11-25  0:00   ` Riyaz Mansoor
1999-11-24  0:00 ` Matthew Heaney
1999-11-24  0:00 ` Lutz Donnerhacke
1999-11-24  0:00 ` Gautier
1999-11-25  0:00 ` Robert Dewar
replies disabled

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