comp.lang.ada
 help / color / mirror / Atom feed
From: jpwoodruff@irisinternet.net (John Woodruff)
Subject: Re: function "and"
Date: 5 Oct 2004 15:38:00 -0700
Date: 2004-10-05T15:38:00-07:00	[thread overview]
Message-ID: <34defe4d.0410051438.24190de2@posting.google.com> (raw)
In-Reply-To: cjuqtc$pka$02$1@news.t-online.com

"Rick Santa-Cruz" <rick_santa_cruz75@msn.com> wrote in message news:<cjuqtc$pka$02$1@news.t-online.com>...
> Hi,
> 
> if I wanna overload the operator "and" then why I have to use quotes?
> Are there other cases when I have to use quotes?


Hi Rick

I've been reading your queries and benefiting from the discussions, so
I'll throw in an attempt at this one:

"And" is an operator which can be overloaded.  As such it can (unlike
other functions that are not operators) occur in an infix expression.

Operators are denoted by a few special symbols, or by reserved words,
thus are recognized in a compiler's parser.

The operators that behave like this are *, **, /, +, -, and, or, xor,
mod, rem, &, and the relationals (> and its friends).

You can overload any of these (the declaration needs to qoute the
operator name) but you can't define new operators.

John



  parent reply	other threads:[~2004-10-05 22:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-05 18:58 function "and" Rick Santa-Cruz
2004-10-05 19:20 ` David C. Hoos
2004-10-05 19:22 ` Frank J. Lhota
2004-10-05 19:56 ` Jeffrey Carter
2004-10-05 22:38 ` John Woodruff [this message]
2004-10-06  8:18 ` Martin Krischik
2004-10-06  9:33 ` Dmitry A. Kazakov
replies disabled

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