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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Received: by 10.182.246.39 with SMTP id xt7mr10804993obc.40.1392658669709; Mon, 17 Feb 2014 09:37:49 -0800 (PST) Path: border1.nntp.dca.giganews.com!nntp.giganews.com!c10no26783311igq.0!news-out.google.com!s3ni22251qas.0!nntp.google.com!peer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!peer03.am1!peering.am1!npeersf04.am4!fx30.fr7.POSTED!not-for-mail Message-ID: From: Mike H Reply-To: Mike Hopkins Newsgroups: comp.lang.ada Subject: Re: Text_IO, was: Re: Something I don't understand References: <4a3e55f6-9f54-4084-9f37-96efd4b0d349@googlegroups.com> <0b358700-871b-4603-addd-65e07c7d59e5@googlegroups.com> <53022b7f$0$6661$9b4e6d93@newsspool2.arcor-online.net> MIME-Version: 1.0 User-Agent: Turnpike/6.07-M (<8k+$+TZw77PdC5diUa0NqJM4ZU>) NNTP-Posting-Host: 83.104.138.185 X-Complaints-To: abuse@demon.net X-Trace: 1392658668 83.104.138.185 (Mon, 17 Feb 2014 17:37:48 UTC) NNTP-Posting-Date: Mon, 17 Feb 2014 17:37:48 UTC Date: Mon, 17 Feb 2014 17:34:02 +0000 X-Received-Body-CRC: 519699731 X-Received-Bytes: 2858 Content-Type: text/plain;charset=utf-8;format=flowed Content-Transfer-Encoding: 8bit X-Original-Bytes: 2714 Xref: number.nntp.dca.giganews.com comp.lang.ada:184943 Date: 2014-02-17T17:34:02+00:00 List-Id: In message <53022b7f$0$6661$9b4e6d93@newsspool2.arcor-online.net>, G.B. writes >On 17.02.14 13:52, Simon Clubley wrote: >> On 2014-02-16, Robert A Duff wrote: > >>> A simplified and type-safe version of C's printf style >>> (template-based) formatting would be more readable than >>> concatenating a bunch of strings together to print messages, >>> and MUCH better than using a series of Put calls to print >>> a single message. >>> >> >> _Totally_ agree with this. It would also be nice if one could write >> something like this (pseudo Fortran style to get the idea across): >> "5(I4,2X,F10.4,2X)" so you could specify the layout for 5 columns worth >> (in this example) of data cleanly. > >I wonder if this feature could be tacked onto the string >types? With the help of attribute functions and named >bindings, formatting could be handled flexibly, leaving room >for internationalization, for example. Formatting could also >be handled conveniently, insofar as the language provides >"obvious" default formatting. Albeit, in COBOL, I once worked on a "convertible currency ledger" (e.g. one where the items are recorded in both the currency of the foreign customer and the sterling value derived from the exchange rate in force at the time of the transaction), Ada generics would probably be my first line of investigation. -- Cotswold Mike "Homo sum, humani nihil a me alienum puto" = "I am human, (so) I (should) judge nothing of humanity to be strange." Publius Terentius (195/185–159 BC)