From: Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov>
Subject: Re: Operator question.
Date: 14 Feb 2002 16:26:27 -0500
Date: 2002-02-14T21:31:17+00:00 [thread overview]
Message-ID: <ueljnpxfg.fsf@gsfc.nasa.gov> (raw)
In-Reply-To: 2vRa8.11975$kt5.28657@rwcrnsc52.ops.asp.att.net
Wannabe h4x0r <chris@dont.spam.me> writes:
> Alright, forgive me if this question seems dumb. I cant beleive I havent
> asked it before now.(or maybe I have and I just forgot.)
>
> What does the operator '=>' mean? I've been looking through my book
> "Programming in Ada95" but I cant seem to find it anywhere.
Strictly speaking, "=>" is not an operator; it does not specify an
action performed on parameters, like "+" and "*" do. This may seem
like a nit, but it is very helpful to use correct terminology.
LRM 2.2 (14) says "=>" is called "arrow".
It is used for named association; it "associates" a parameter name
with the actual value in a subprogram call. For example:
procedure Foo (First, Last : in Integer);
Foo (First => 1, Last => 2);
This means the parameter 'First' gets the value 1, and 'Last' gets the
value 2. People often read "=>" as "gets".
Named association is also used in aggregates for records and arrays.
--
-- Stephe
next prev parent reply other threads:[~2002-02-14 21:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-14 16:22 Operator question Wannabe h4x0r
2002-02-14 16:55 ` Martin Dowie
2002-02-14 19:56 ` Jerry Petrey
2002-02-14 21:26 ` Stephen Leake [this message]
2002-02-16 7:36 ` Operator question.(Thanks) Wannabe h4x0r
2002-02-16 13:51 ` Marc A. Criley
-- strict thread matches above, loose matches on Subject: below --
2002-02-15 6:03 Operator question Christoph Grein
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox