TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
"Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Christoph & Ursula Grein <[log in to unmask]>
Mon, 5 May 1997 20:48:00 +0100
Christoph & Ursula Grein <[log in to unmask]>
text/plain (56 lines)
>Hello again:
>Who knows, given that I advise on software to be used in our curriculum
>I might just convince them to use Ada instead of Code Warrior. :)
>(But I have to learn it first ;> )
>Again, thanks...
>Sybelle Rodriguez
>Systems Administrator
>Computer Art Department
>Savannah College of Art & Design
>Office 912-944-2290
>Fax    912-944-2283

Hi Sybelle  :>))

it's great that you want to learn Ada - it's as easy as can be.
(Of course I'm an Adavotee which is to say a C-phobic - but what matters:
I doubt that C(++) is easier to learn.)

So just to please you, I'm sending you a little puzzle for your classroom:

procedure For_Sybelle is

  type Rodriguez is
      Sybelle: Integer := 1;
    end record;

  Sybelle: Integer;

  function Puzzling return Rodriguez is
    Sybelle: Integer := 0;
    return (Sybelle => Puzzling.Sybelle);
  end Puzzling;


  Sybelle := Puzzling.Sybelle;

end For_Sybelle;

Is this correct although it's recursive without end condition?
And what is the result?
Perhaps you'd like and try to invent a program with fewer names.

I'd be happy to learn whether you liked this little program.

Christoph Grein
[log in to unmask]