From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.66.100.163 with SMTP id ez3mr12455975pab.38.1430054478992; Sun, 26 Apr 2015 06:21:18 -0700 (PDT) X-Received: by 10.140.84.202 with SMTP id l68mr72226qgd.5.1430054478732; Sun, 26 Apr 2015 06:21:18 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!l13no10314197iga.0!news-out.google.com!k20ni1088qgd.0!nntp.google.com!j5no3816218qga.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 26 Apr 2015 06:21:18 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=50.111.79.106; posting-account=Ies7ywoAAACcdHZMiIRy0M84lcJvfxwg NNTP-Posting-Host: 50.111.79.106 References: <47c7df1e-17c1-44cb-a455-43431f0d39cd@googlegroups.com> <85zj5wb9et.fsf@stephe-leake.org> <4b14659e-8c26-4c0a-8945-a5289740e054@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <51c639dd-a48c-4130-becd-750cb23094da@googlegroups.com> Subject: Re: Textedit and txt From: brbarkstrom@gmail.com Injection-Date: Sun, 26 Apr 2015 13:21:18 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:25639 Date: 2015-04-26T06:21:18-07:00 List-Id: 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 sometime= s strange ideas. Terminal an pico works too. Not really a fan of emacs/aqua= macs. 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 :=3D 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=20 a new Bounded_String, you define S : Vstring.Bounded_String; then, when you want to put characters into the string, you can put S :=3D Vstring.To_Bounded_String("whatever"); with that, you can append, as in S :=3D Vstring.Append(S, " and something else"); get the length of the string Length_Of_String :=3D 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.