comp.lang.ada
 help / color / mirror / Atom feed
From: "Martin Dowie" <martin.dowie@nospam.baesystems.com>
Subject: Re: Operator question.
Date: Thu, 14 Feb 2002 16:55:07 -0000
Date: 2002-02-14T16:55:07+00:00	[thread overview]
Message-ID: <3c6bebdf@pull.gecm.com> (raw)
In-Reply-To: 2vRa8.11975$kt5.28657@rwcrnsc52.ops.asp.att.net

"Wannabe h4x0r" <chris@dont.spam.me> wrote in message
news:2vRa8.11975$kt5.28657@rwcrnsc52.ops.asp.att.net...
> 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.
>
> I see it everywhere in Ada code. Maybe I'm just a slow learner.

Me too ;-)

'=>' is use in a number of places, but really just to get a nice
readable syntax - it has no hidden value itself:

1. In named association e.g. the procedure call:
    Foo (Value => Bar);

   'Value' is the 'formal parameter name', 'Bar' is the 'actual parameter'

2. In case statements:
   case Value is
      when Foo =>
         ...
   end case;

3. In array assignment:
   Value : Array_Type := (1 .. 10 => 0);

4. In exception handlers:
   begin
      ...
   exception
      when My_Exception =>
         ...
   end;

There are probably others which I can't think of off the top of my
head.

Hope this helps.





  reply	other threads:[~2002-02-14 16:55 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 [this message]
2002-02-14 19:56 ` Jerry Petrey
2002-02-14 21:26 ` Stephen Leake
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