Groups | Search | Server Info | Login | Register
Groups > comp.lang.misc > #11191
| From | Andy Walker <anw@cuboid.co.uk> |
|---|---|
| Newsgroups | comp.lang.misc |
| Subject | Re: Algol 68 - formatting with fixed point format |
| Date | 2025-08-31 00:44 +0100 |
| Organization | Not very much |
| Message-ID | <10902c9$2gbk4$1@dont-email.me> (permalink) |
| References | (2 earlier) <108ctni$2a3d1$1@dont-email.me> <108dip5$227hj$3@dont-email.me> <108g9t5$34hb6$1@dont-email.me> <108lhni$3a1o4$2@dont-email.me> <108u060$2dqfi$1@dont-email.me> |
On 30/08/2025 05:54, Janis Papanagnou wrote:
> I want to take up that sub-thread for another approach of my argument.
> In the past I may have spread bits and pieces and hoped to trigger the
> associations that were sprouting in my mind. I hope this example below
> shows why I think (most of all) that the FORMAT concept adds to A68's
> orthogonality and coherence, and (as a secondary issue and spin-off)
> why some parts of the syntax were rightly chosen the way they are.
Then you have a different meaning for "orthogonal" from me and
from the Revised Report; section 0.1.2 [which I quoted on Wednesday].
See also below.
> The example(s) use(s) "controlled" formatting and nested formats...
> For output I'm using, e.g.
> FORMAT fmt = $ "Diagnosis " b("positive", "negative") l $;
> printf ((fmt, act_state));
[... equivalent C or unformatted A68 snipped ...]
> Now I'd wonder how I'd read in such formats. - To make it short; we'd
> need the programmer write a generally complex, bulky, thus error-prone
> parser.
(a) If you replace formats by strings, then there would be the
equivalent "parser" in the standard library. There's no need to get rid
of the utility; if it's generally useful, it would be provided [and the
RR virtually codes it up for you -- see section 10.3.4.8.1bb and cc].
(b) Having it as a special mode [type] means that you can't just
replace it by a more useful "parser". For example, these days it would be
useful to allow regular expressions in the strings, eg to allow arbitrary
spacing around the words. You're stuck with what the implementer gives
you. To revert to a previous example, if you want "fixed (0.32, 0, 1)" to
produce "0.3" instead of ".3", you can roll your own. If you want a "g"
format to do the same, it's much harder.
[...]
> (And nesting of '$' symbols is also unnecessary, BTW.)
May be "unnecessary", but the language allows it, so a lexer has
to work around that.
> [...] imagine a "C" scanf that would be required to read and
> differentiate string variants in input (here for example "positive",
> "negative", in the bool-controlled example; it's just not possible
> I'd say, so an overly complex user defined parsing will be required).
As above, if the facility is sufficiently useful, it will be
provided as a library routine. You seem again to be assuming that the
whole concept of formatted transput would be zapped, and/or reduced
to what C provides. Not so. But in accordance with RR0.1.2, there's
little if any need for the [specific] "$ ... $" formats; much the
same functionality can be provided [more flexibly] by format strings,
and [therefore] with no new syntax.
--
Andy Walker, Nottingham.
Andy's music pages: www.cuboid.me.uk/andy/Music
Composer of the day: www.cuboid.me.uk/andy/Music/Composers/Paderewski
Back to comp.lang.misc | Previous | Next — Previous in thread | Next in thread | Find similar
Algol 68 - formatting with fixed point format Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-08-23 06:49 +0200
Re: Algol 68 - formatting with fixed point format Andy Walker <anw@cuboid.co.uk> - 2025-08-23 15:22 +0100
Re: Algol 68 - formatting with fixed point format Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-08-23 17:49 +0200
Re: Algol 68 - formatting with fixed point format Andy Walker <anw@cuboid.co.uk> - 2025-08-24 00:58 +0100
Re: Algol 68 - formatting with fixed point format Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-08-25 01:49 +0200
Re: Algol 68 - formatting with fixed point format Andy Walker <anw@cuboid.co.uk> - 2025-08-26 23:53 +0100
Re: Algol 68 - formatting with fixed point format Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-08-23 19:28 +0200
Re: Algol 68 - formatting with fixed point format Andy Walker <anw@cuboid.co.uk> - 2025-08-24 00:27 +0100
Re: Algol 68 - formatting with fixed point format Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-08-24 02:49 +0000
Re: Algol 68 - formatting with fixed point format Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-08-25 01:57 +0200
Re: Algol 68 - formatting with fixed point format Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-08-25 02:14 +0200
Re: Algol 68 - formatting with fixed point format Andy Walker <anw@cuboid.co.uk> - 2025-08-27 00:58 +0100
Re: Algol 68 - formatting with fixed point format Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-08-27 08:23 +0200
Re: Algol 68 - formatting with fixed point format Andy Walker <anw@cuboid.co.uk> - 2025-08-27 23:23 +0100
Re: Algol 68 - formatting with fixed point format Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-08-28 07:35 +0200
Re: Algol 68 - formatting with fixed point format Andy Walker <anw@cuboid.co.uk> - 2025-08-29 00:43 +0100
Re: Algol 68 - formatting with fixed point format Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-08-30 05:40 +0200
Re: Algol 68 - formatting with fixed point format Andy Walker <anw@cuboid.co.uk> - 2025-08-30 20:38 +0100
Re: Algol 68 - formatting with fixed point format Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-08-31 10:10 +0200
Re: Algol 68 - formatting with fixed point format Andy Walker <anw@cuboid.co.uk> - 2025-09-01 17:20 +0100
Algol 68 / Genie - new release (was Re: Algol 68 - formatting with fixed point format) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-09-02 00:56 +0200
Re: Algol 68 / Genie - new release Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-09-02 01:15 +0200
Re: Algol 68 / Genie - new release (was Re: Algol 68 - formatting with fixed point format) Andy Walker <anw@cuboid.co.uk> - 2025-09-02 17:02 +0100
Re: Algol 68 / Genie - new release (was Re: Algol 68 - formatting with fixed point format) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-09-02 22:17 +0200
Re: Algol 68 / Genie - new release (was Re: Algol 68 - formatting with fixed point format) Andy Walker <anw@cuboid.co.uk> - 2025-09-04 17:01 +0100
Re: Algol 68 / Genie - new release (was Re: Algol 68 - formatting with fixed point format) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-09-05 04:32 +0200
Re: Algol 68 / Genie - new release (was Re: Algol 68 - formatting with fixed point format) Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-09-02 23:04 +0000
Re: Algol 68 / Genie - new release (was Re: Algol 68 - formatting with fixed point format) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-09-03 01:46 +0200
Re: Algol 68 / Genie - new release (was Re: Algol 68 - formatting with fixed point format) Andy Walker <anw@cuboid.co.uk> - 2025-09-04 00:30 +0100
Re: Algol 68 / Genie - new release Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-09-10 17:15 +0200
Re: Algol 68 / Genie - new release Andy Walker <anw@cuboid.co.uk> - 2025-09-10 23:57 +0100
Re: Algol 68 / Genie - new release Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-09-11 07:27 +0200
Re: Algol 68 / Genie - new release Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-09-11 09:42 +0200
Re: Algol 68 / Genie - new release Andy Walker <anw@cuboid.co.uk> - 2025-09-11 17:16 +0100
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-09-27 00:41 +0100
Re: Algol 68 / Genie - new release Andy Walker <anw@cuboid.co.uk> - 2025-09-27 14:38 +0100
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-09-29 01:15 +0100
Re: Algol 68 / Genie - new release Andy Walker <anw@cuboid.co.uk> - 2025-09-29 16:05 +0100
Re: Algol 68 / Genie - new release Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-09-29 18:57 +0200
Re: Algol 68 / Genie - new release Andy Walker <anw@cuboid.co.uk> - 2025-09-30 15:58 +0100
Re: Algol 68 / Genie - new release Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-09-30 17:48 +0200
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-09-29 19:08 +0100
Re: Algol 68 / Genie - new release Andy Walker <anw@cuboid.co.uk> - 2025-09-30 23:23 +0100
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-10-01 23:00 +0100
Re: Algol 68 / Genie - new release Andy Walker <anw@cuboid.co.uk> - 2025-10-02 16:55 +0100
Re: Algol 68 / Genie - new release Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-02 21:51 +0000
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-10-04 12:38 +0100
Re: Algol 68 / Genie - new release Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-10-04 14:04 +0200
Re: Algol 68 / Genie - new release Andy Walker <anw@cuboid.co.uk> - 2025-10-04 13:47 +0100
Re: Algol 68 / Genie - new release Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-10-04 15:03 +0200
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-10-04 15:07 +0100
Re: Algol 68 / Genie - new release Andy Walker <anw@cuboid.co.uk> - 2025-10-04 18:40 +0100
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-10-04 19:46 +0100
Re: Algol 68 / Genie - new release Andy Walker <anw@cuboid.co.uk> - 2025-10-07 16:37 +0100
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-10-07 17:16 +0100
Re: Algol 68 / Genie - new release Andy Walker <anw@cuboid.co.uk> - 2025-10-07 23:58 +0100
Re: Algol 68 / Genie - new release Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-10-08 01:20 +0200
Re: Algol 68 / Genie - new release Andy Walker <anw@cuboid.co.uk> - 2025-10-08 16:10 +0100
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-10-08 17:41 +0100
Re: Algol 68 / Genie - new release Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-10-09 00:53 +0200
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-10-09 01:02 +0100
Re: Algol 68 / Genie - new release Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-10-08 01:09 +0200
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-10-07 22:27 +0100
Re: Algol 68 / Genie - new release richard@cogsci.ed.ac.uk (Richard Tobin) - 2025-10-08 00:20 +0000
Re: Algol 68 / Genie - new release Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-04 22:00 +0000
Re: Algol 68 / Genie - new release Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-10-05 00:31 +0200
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-10-05 01:52 +0100
Re: Algol 68 / Genie - new release Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-05 03:15 +0000
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-10-05 11:05 +0100
Re: Algol 68 / Genie - new release Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-05 20:20 +0000
Re: Algol 68 / Genie - new release David Brown <david.brown@hesbynett.no> - 2025-10-06 09:44 +0200
Higher order functions (was Re: Algol 68 / Genie - new release) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-10-06 10:01 +0200
Re: Higher order functions (was Re: Algol 68 / Genie - new release) David Brown <david.brown@hesbynett.no> - 2025-10-06 10:56 +0200
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-10-06 11:03 +0100
Re: Algol 68 / Genie - new release Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-06 22:01 +0000
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-10-06 23:46 +0100
Re: Algol 68 / Genie - new release Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-06 23:05 +0000
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-10-07 10:32 +0100
Re: Algol 68 / Genie - new release Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-08 04:57 +0000
Re: Algol 68 / Genie - new release David Brown <david.brown@hesbynett.no> - 2025-10-05 13:24 +0200
Re: Algol 68 / Genie - new release antispam@fricas.org (Waldek Hebisch) - 2025-10-08 20:21 +0000
Re: Algol 68 / Genie - new release Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-08 21:30 +0000
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-10-08 22:40 +0100
Re: Algol 68 / Genie - new release antispam@fricas.org (Waldek Hebisch) - 2025-10-10 04:18 +0000
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-10-10 16:21 +0100
Re: Algol 68 / Genie - new release antispam@fricas.org (Waldek Hebisch) - 2025-10-11 00:05 +0000
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-10-11 11:25 +0100
Re: Algol 68 / Genie - new release Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-10-11 13:08 +0200
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-10-11 15:25 +0100
Re: Algol 68 / Genie - new release antispam@fricas.org (Waldek Hebisch) - 2025-10-11 12:39 +0000
Re: Algol 68 / Genie - new release Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-10-09 00:34 +0200
Re: Algol 68 / Genie - new release antispam@fricas.org (Waldek Hebisch) - 2025-10-09 03:15 +0000
Re: Algol 68 / Genie - new release ram@zedat.fu-berlin.de (Stefan Ram) - 2025-10-09 08:59 +0000
Re: Algol 68 / Genie - new release antispam@fricas.org (Waldek Hebisch) - 2025-10-09 14:31 +0000
Re: Algol 68 / Genie - new release ram@zedat.fu-berlin.de (Stefan Ram) - 2025-10-09 14:53 +0000
Re: Algol 68 / Genie - new release ram@zedat.fu-berlin.de (Stefan Ram) - 2025-10-09 10:35 +0000
Re: Algol 68 / Genie - new release Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-09 21:37 +0000
Re: Algol 68 / Genie - new release David Brown <david.brown@hesbynett.no> - 2025-10-10 17:40 +0200
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-10-10 20:04 +0100
Re: Algol 68 / Genie - new release Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-10 21:45 +0000
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-10-11 00:29 +0100
Re: Algol 68 / Genie - new release Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-11 00:16 +0000
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-10-11 01:59 +0100
Re: Algol 68 / Genie - new release Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-11 01:42 +0000
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-10-11 10:42 +0100
Re: Algol 68 / Genie - new release Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-31 06:51 +0000
Re: Algol 68 / Genie - new release David Brown <david.brown@hesbynett.no> - 2025-10-13 20:58 +0200
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-10-13 23:13 +0100
Re: Algol 68 / Genie - new release David Brown <david.brown@hesbynett.no> - 2025-10-14 00:39 +0200
Re: Algol 68 / Genie - new release antispam@fricas.org (Waldek Hebisch) - 2025-10-12 03:56 +0000
Re: Algol 68 / Genie - new release David Brown <david.brown@hesbynett.no> - 2025-10-13 22:38 +0200
Re: Algol 68 / Genie - new release antispam@fricas.org (Waldek Hebisch) - 2025-10-24 04:33 +0000
Re: Algol 68 / Genie - new release antispam@fricas.org (Waldek Hebisch) - 2025-10-03 22:24 +0000
Re: Algol 68 / Genie - new release Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-04 03:39 +0000
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-10-04 12:19 +0100
Re: Algol 68 / Genie - new release Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-10-04 14:16 +0200
Re: Algol 68 / Genie - new release Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-04 21:05 +0000
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-10-05 01:40 +0100
Re: Algol 68 / Genie - new release Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-05 03:13 +0000
Re: Algol 68 / Genie - new release antispam@fricas.org (Waldek Hebisch) - 2025-10-05 01:29 +0000
Re: Algol 68 / Genie - new release Andy Walker <anw@cuboid.co.uk> - 2025-10-07 15:25 +0100
Re: Algol 68 / Genie - new release bart <bc@freeuk.com> - 2025-10-07 17:03 +0100
Re: Algol 68 / Genie - new release Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-07 22:09 +0000
Re: Algol 68 / Genie - new release Adam Sampson <ats@offog.org> - 2025-10-08 18:22 +0100
Re: Algol 68 / Genie - new release Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-08 21:48 +0000
Re: Algol 68 / Genie - new release antispam@fricas.org (Waldek Hebisch) - 2025-10-08 23:45 +0000
Re: Algol 68 - formatting with fixed point format Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-08-30 06:54 +0200
Re: Algol 68 - formatting with fixed point format Andy Walker <anw@cuboid.co.uk> - 2025-08-31 00:44 +0100
Re: Algol 68 - formatting with fixed point format Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-08-31 08:12 +0000
Re: Algol 68 - formatting with fixed point format Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-08-31 10:42 +0200
Re: Algol 68 - formatting with fixed point format Andy Walker <anw@cuboid.co.uk> - 2025-09-01 00:10 +0100
Re: Algol 68 - formatting with fixed point format Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-09-01 07:30 +0000
Re: Algol 68 - formatting with fixed point format Andy Walker <anw@cuboid.co.uk> - 2025-09-01 16:13 +0100
Re: Algol 68 - formatting with fixed point format Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-09-01 22:41 +0000
Re: Algol 68 - formatting with fixed point format Andy Walker <anw@cuboid.co.uk> - 2025-09-02 14:23 +0100
Re: Algol 68 - formatting with fixed point format Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-09-02 23:08 +0000
Re: Algol 68 - formatting with fixed point format Andy Walker <anw@cuboid.co.uk> - 2025-09-04 00:54 +0100
Re: Algol 68 - formatting with fixed point format Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-08-31 10:29 +0200
Re: Algol 68 - formatting with fixed point format Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-08-24 02:47 +0000
csiph-web