comp.lang.ada
 help / color / mirror / Atom feed
From: "John A. S. Rowlands" <john.rowlands@baesystems.com>
Subject: Re: Constraint Error
Date: Thu, 30 Sep 2004 14:47:34 +0100
Date: 2004-09-30T14:47:34+01:00	[thread overview]
Message-ID: <415c0cc3$1_1@baen1673807.greenlnk.net> (raw)
In-Reply-To: cjfg8e$g6i$00$1@news.t-online.com

Rick,

Try

   M.Text := Ada.Strings.Fixed.Head(
     Source => Str,
     Count => String_Txt.Size,
     Pad => ' ');

instead of your current assignment to M.Text

John Rowlands
BAE SYSTEMS, Warton, UK

"Rick Santa-Cruz" <rick_santa_cruz75@msn.com> wrote in message
news:<cjfg8e$g6i$00$1@news.t-online.com>...
>
> how can I avoid the Constraint Error, when executing the following code:
> ------------------------------
> package body Messages is
>  function Create(Str: String) return Message is
>   M: Message;
>  begin
>   M.Text := Str;
>   return M;
>  end Create;
> end Messages;





  parent reply	other threads:[~2004-09-30 13:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-29 23:24 Constraint Error Rick Santa-Cruz
2004-09-30  0:42 ` Jeffrey Carter
2004-09-30  0:42 ` Stephen Leake
2004-09-30  1:11 ` tmoran
2004-09-30 13:47 ` John A. S. Rowlands [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-04-07  0:00 Constraint error Nirmala Bhupathi
1999-04-07  0:00 ` Matthew Heaney
1999-04-07  0:00   ` Nirmala Bhupathi
1999-04-08  0:00     ` Matthew Heaney
1987-04-10 21:47 Constraint_Error keith
replies disabled

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