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.36.7.204 with SMTP id f195mr1648517itf.37.1517596463408; Fri, 02 Feb 2018 10:34:23 -0800 (PST) X-Received: by 10.157.87.132 with SMTP id q4mr429324oth.2.1517596463202; Fri, 02 Feb 2018 10:34:23 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.am4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!w142no693380ita.0!news-out.google.com!s63ni1234itb.0!nntp.google.com!w142no693375ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 2 Feb 2018 10:34:22 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=82.231.187.9; posting-account=O1Kt4QoAAABKYAjrg-cGai_vZLnN2LEw NNTP-Posting-Host: 82.231.187.9 References: <575826a1-c983-49aa-95e2-54048f6b7b5b@googlegroups.com> <3b72aae1-7ff4-48a9-a154-f17cd6784334@googlegroups.com> <7f5fec97-6ae6-4833-87df-77aac5a8e4ff@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <191ef0a8-865e-49be-baa6-6c5c2d0b55fc@googlegroups.com> Subject: Re: [ANN] List_Image v0.2.0 From: Lionel Draghi Injection-Date: Fri, 02 Feb 2018 18:34:23 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Body-CRC: 190822577 X-Received-Bytes: 3994 Xref: reader02.eternal-september.org comp.lang.ada:50279 Date: 2018-02-02T10:34:22-08:00 List-Id: Le vendredi 2 f=C3=A9vrier 2018 01:02:08 UTC+1, Randy Brukardt a =C3=A9crit= =C2=A0: > "Lionel Draghi"... wrote in message=20 > ... > >You missed my point, I don't want to limit vendors possibilities to Wind= ows=20 > >and Unix. > >Defining a function, and let vendors specify what is returned on each=20 > >platform would > >be an acceptable choice (and almost as easy to implement than the useles= s=20 > >System_Name). >=20 > What would such a function return on OpenVMS, which does not use a charac= ter=20 > to mark New_Line?? >=20 > Randy. Randy, your're asking my compiler vendor opinion, I'll give it to you! :-)= =20 It's implementation defined! :-) In the current version of my compiler on OpenVMS, the function returns "", = and that it.=20 But in the next version, I'll be smarter : I will return CRLF : if the goal= is to scan a string where you have yourself inserted the sequence, and the= n call Put_Line when the sequence is met, it will works better :-).=20 Obviously, users should be warned that string that already contains that se= quence will be akwardly cut : i'll put it bold in the doc! =20 But seriously, that's an acceptable side effect, considering that most Ada = users will never face it. =20 ----8<---- end of my compiler vendors carreer :-) I am aware that there is no silver bullet at this level, because we are try= ing to manipulate multiple lines within a single String : "fatal conceptual= constraint error will be raised here!". The only good solution would be that my Image function returns, not a Strin= g, but a list of String, with no line terminator at all, and that generic p= arameters that are Strings also becomes list of String. I have to check by trying to specify such an alternate generic, but I expec= t it will add a lot of complexity for a problem that rarely arise. Interresting, never te less, and it smells good my favorite fragrance : "co= nceptual integrity" by Ada. And what would be the type of that list, that should be simple, efficient a= nd unbounded, sparkable, etc. Look's like we need a "Text" abstraction here= (*). And also another Signature package...=20 Seem's to be a fun challenge, I'm on it! :-) (*) After all, we have a Text_IO package since the origin of Ada, it's time= to define what is a Text!=20 =20