comp.lang.ada
 help / color / mirror / Atom feed
From: Pascal Obry <pascal@obry.net>
Subject: Re: trimming strings
Date: Mon, 04 Aug 2014 12:49:50 +0200
Date: 2014-08-04T12:49:50+02:00	[thread overview]
Message-ID: <1407149390.2959.383.camel@pascal.home.net> (raw)
In-Reply-To: 4be61c53-01e0-4700-8ef3-f1e8975e3e9d@googlegroups.com

Le lundi 04 août 2014 à 03:06 -0700, mockturtle a écrit : 
> On Monday, August 4, 2014 2:17:28 AM UTC+2, Shark8 wrote:
> > 
> > Make liberal use of things like 'First, 'Last, 'Length and don't assume 
> > your 'Fists = 1. 
>         ^^^^^
>           
>           
> This is what I would call "aggressive programming" :-) :-) :-)

Not really, you don't want to assume a string will start to 1.

   procedure Call (Str : in out String) is
   begin
     Str (1) := 'b'; -- assuming 'First is 1 is wrong
   end Call;

   Whatever : String := "une belle phrase!";

Then the following call will just fail:

   Call (Whatever (4 .. 8));

-- 
  Pascal Obry /  Magny Les Hameaux (78)

  The best way to travel is by means of imagination

  http://v2p.fr.eu.org
  http://www.obry.net

  gpg --keyserver keys.gnupg.net --recv-key F949BD3B




  reply	other threads:[~2014-08-04 10:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-02 13:10 trimming strings agent
2014-08-02 14:21 ` Pascal Obry
2014-08-02 15:27   ` G.B.
2014-08-02 17:00     ` Adam Beneschan
2014-08-02 17:22 ` mockturtle
2014-08-03 21:42   ` agent
2014-08-03 23:14     ` Georg Bauhaus
2014-08-04  0:17     ` Shark8
2014-08-04 10:06       ` mockturtle
2014-08-04 10:49         ` Pascal Obry [this message]
2014-08-04 11:51           ` Simon Clubley
2014-08-04 12:11             ` Pascal Obry
2014-08-04 16:50         ` Shark8
2014-08-04 23:28           ` Dennis Lee Bieber
2014-08-05 21:05             ` agent
replies disabled

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