comp.lang.ada
 help / color / mirror / Atom feed
From: brbarkstrom@gmail.com
Subject: Re: Textedit and txt
Date: Sun, 26 Apr 2015 06:21:18 -0700 (PDT)
Date: 2015-04-26T06:21:18-07:00	[thread overview]
Message-ID: <51c639dd-a48c-4130-becd-750cb23094da@googlegroups.com> (raw)
In-Reply-To: <f2449f16-4901-4b85-86d3-79b8235ad4ec@googlegroups.com>

On Sunday, April 26, 2015 at 7:52:05 AM UTC-4, Laurent wrote:
> Thanks for the hint. Why hide that in the preferences? Apple has sometimes strange ideas. Terminal an pico works too. Not really a fan of emacs/aquamacs. Tried once to learn mozart oz as language and they used emacs as ide. Didn't really work for me so I gave up.

I'd suggest taking a look at the Reference Manual section on
the Bounded_Strings package.  You can create a default Bounded_String
length in a package (say named Common_Defs.ads) using

  Std_Vstring_Length  : constant :=  256;
  package VString     is new
    Ada.Strings.Bounded.Generic_Bounded_Length(Std_Vstring_Length);

Then, you just with and use Common_Defs.  When you want to create 
a new Bounded_String, you define

  S : Vstring.Bounded_String;

then, when you want to put characters into the string, you can put

  S := Vstring.To_Bounded_String("whatever");

with that, you can append, as in

  S := Vstring.Append(S, " and something else");

get the length of the string

  Length_Of_String := Natural(Vstring.Length(S));

and so on.

This isn't really complicated, although my natural coding style is
quite verbose.  If you use this approach, you should be able to stop
worrying about whether you're working with an Apple or some other kind
of machine.  It's already part of the standard Ada packages.

Bruce B.


  reply	other threads:[~2015-04-26 13:21 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-24 21:40 Annoying behavior Laurent
2015-04-25  4:31 ` gautier_niouzes
2015-04-25  6:51   ` Laurent
2015-04-25  4:50 ` Niklas Holsti
2015-04-25  7:15   ` Laurent
2015-04-25  8:10     ` Niklas Holsti
2015-04-25 15:37       ` Laurent
2015-04-25 13:54 ` Stephen Leake
2015-04-25 15:46   ` Laurent
2015-04-25 17:02     ` Simon Wright
2015-04-25 17:41     ` Niklas Holsti
2015-04-25 18:58       ` Laurent
2015-04-25 19:30         ` Georg Bauhaus
2015-04-25 20:13           ` Laurent
2015-04-25 21:46             ` Laurent
2015-04-25 23:16           ` Bob Duff
2015-04-26 10:38     ` Jedi Tek'Unum
2015-04-26 11:52       ` Textedit and txt Laurent
2015-04-26 13:21         ` brbarkstrom [this message]
2015-05-06 21:23           ` Randy Brukardt
2015-05-07 21:12             ` Laurent
2015-05-07 21:48               ` Simon Wright
2015-05-07 22:24                 ` Laurent
2015-05-08  5:50                   ` Simon Wright
2015-05-08  7:35                     ` Laurent
2015-05-08 23:35               ` Randy Brukardt
2015-05-09 19:25                 ` Laurent
2015-05-09 21:36                   ` Anh Vo
2015-05-11 17:00                 ` Shark8
2015-05-11 17:49                   ` Dmitry A. Kazakov
2015-05-09 15:23               ` brbarkstrom
2015-05-12  1:10                 ` Randy Brukardt
2015-05-12 12:44                   ` brbarkstrom
2015-05-12 21:57                     ` Randy Brukardt
2015-05-13 12:07                       ` brbarkstrom
replies disabled

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