comp.lang.ada
 help / color / mirror / Atom feed
From: Valdes <valdesl@wanadoo.fr>
Subject: Some problems with string type
Date: Thu, 07 Jun 2001 04:18:08 +0200
Date: 2001-06-06T16:11:22+00:00	[thread overview]
Message-ID: <3B1EE460.D08AD019@wanadoo.fr> (raw)

I have my program writen in Ada that raise some exceptions:

raised CONSTRAINT_ERROR : gestindex.adb:5

... And at line 5...

 function createindex (S:string) return index is
      I:Index;
   begin
      i.nameindex:=s; -- Ligne cinq
      i.firstletter:=null;
      return i;
   end createindex;

... The index record is defined as follow...

  type index is record
      nameindex:String(1..20);
      firstletter:ptrletter;
   end record;

... The mistake seems to be trivial but I don't see it.

I have seen the same for this also:

    Ptrtemp.Letter:=Charat(M,Ni);

there is the same error but Charat return a character and letter is also
one. (ptrtemp is also type ptrlettre)

All my greetings if you have some ideas. And forgive me for my bad
english.

--
Le Vif Z�phyr Jubile Sur Les Kumquats Du Clown Gracieux.






             reply	other threads:[~2001-06-07  2:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-07  2:18 Valdes [this message]
2001-06-06 16:34 ` Some problems with string type Philip Anderson
2001-06-06 20:29   ` Some problems with string type(Exact String?) McDoobie
2001-06-06 21:30     ` tmoran
2001-06-07  8:07       ` Jean-Pierre Rosen
2001-06-06 22:08     ` Marin David Condic
2001-06-07  6:48     ` Ada.Strings.Fixed procedure Move Petter Fryklund
2001-06-07  4:06   ` Some problems with string type Valdes
2001-06-07 13:20     ` Valdes Laurent
2001-06-06 17:49 ` tmoran
2001-06-07  4:07   ` Valdes
replies disabled

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