From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.7 required=3.0 tests=BAYES_00,NICE_REPLY_A, REPLYTO_WITHOUT_TO_CC,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 Path: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: "G.B." Newsgroups: comp.lang.ada Subject: Re: String view of file Date: Mon, 21 Nov 2022 14:01:01 +0100 Organization: A noiseless patient Spider Message-ID: References: Reply-To: nonlegitur@notmyhomepage.de MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 21 Nov 2022 13:01:01 -0000 (UTC) Injection-Info: reader01.eternal-september.org; posting-host="93133ae138dfc002920a9deef8052436"; logging-data="4006019"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+66op0PnO5uSTeSF7x3HWs40ONiP/qLhA=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Cancel-Lock: sha1:cPrHAWjXPXjsnGvt35kyg8bOHpM= In-Reply-To: Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:64647 List-Id: On 21.11.22 09:30, Jesper Quorning wrote: > I like to ask about > > Is it possible to write something like this with ADA > > ```Ada > package my_rw_file is new file > (name => "whatever" > ,mode => read_write > ,implementation => standard -- or portable or fast > ); > package as_string is new. xxx(from => my_rw_file); > > -- parse (as_string); > package data is new parse (as_string, format => markdown); -- or whatever > ``` Do you mean, gobble up a file into a string and then parse that? Yes, that's possible in a number of ways.