Groups | Search | Server Info | Login | Register


Groups > comp.lang.misc > #11178

Re: Algol 68 - formatting with fixed point format

From Janis Papanagnou <janis_papanagnou+ng@hotmail.com>
Newsgroups comp.lang.misc
Subject Re: Algol 68 - formatting with fixed point format
Date 2025-08-28 07:35 +0200
Organization A noiseless patient Spider
Message-ID <108oprq$14aon$1@dont-email.me> (permalink)
References (3 earlier) <108dip5$227hj$3@dont-email.me> <108g9t5$34hb6$1@dont-email.me> <108lhni$3a1o4$2@dont-email.me> <108m88q$g2ce$1@dont-email.me> <108o0gf$pluo$2@dont-email.me>

Show all headers | View raw


On 28.08.2025 00:23, Andy Walker wrote:
> On 27/08/2025 07:23, Janis Papanagnou wrote:
[...]
> That is, in essence, the primary mission statement for the language
> [after only "Completeness and clarity of description"].  There is a
> reason why "FORMAT"s were commonly omitted from early compilers!

Algol 68 is already a comparably complex language. FORMAT is yet
another complex sub-language. It's quite obvious to me why this
feature might not have been implemented at first. OTOH, I thought
this would have been a basic inherent component of the standard,
so how could that have been omitted. (Unless you spoke about the
very early time, ~1968 vs. ~1976?)

> 
> [...]
>> I've yet more such examples where ordinary "C" formatting would not
>> help.
> 
>     I wasn't suggesting that "ordinary" C formatting replace A68's
> "FORMAT"s;  rather that the formatting routines should be implemented
> by using strings and structures rather than by using "$ ... $".  Eg,
> your example
> 
>   printf (($ n(UPB pattern_array)(2x g) l $,  match (...) ))
> 
> might look more like
> 
>   printf ((" n (2x g) l ", UPB pattern_array), match (...) )
> 
> [where the parameter to "n" is the next item in a structure rather
> than inside the format string].

Ah, I see. - Actually like the '*' in C's 'printf'. (Where in "C"
it's a (about the sole) higher level operation in printf formatting
syntax. And Algol 68 supports a lot more beyond that.)

Although I have to say that the form you depicted isn't too different
from the current standard one. It just hasn't the language part in the
format. Granted, it may make the work for compiler writers easier.


Though using a "string" object instead of a $format$ object would
take away FORMATs as first class object and would remove the option
to control formatting in a stream like (here just in a simple example)

$ genie -x 'printf (($ g(0) $, 42.67, $ g(0,1) l $, 42.67))'
4342.7

Note that here my point is not that you could write that differently
(say as in "C" demand the format just in a single mandatory argument
at position 1).

You couldn't tell apart a literal string from a format string. (Or
only by [unsafe] "inference", with the problem to make the language
less safe.)

(That are points why I mentioned Awk and GNU Awk in my post. GNU Awk
deliberately added (and rather late) first class regexp objects into
the language; so we can (for example) pass these to procedures without
the necessity for using dynamic regexps (with their own problems that
they come as strings). And the first class regexps are also strongly
typed. An advantage compared to using strings as carrier primitive.)


I'm also curious how the format hierarchies would be achieved then;
having examples in mind where you have an outer format that defines
the structure representation of, say, an array, and an inner format
that (dynamically set) controls the formats of the actual elements'
types formatting. (I suppose you'd need a procedural approach then.)


But okay. We have what we got. Some programmers (and the compiler
implementers) may dislike it. I acknowledge that.

>   [...]
>> What you explain as a burden is what I consider its expressive power
>> (compared to, say, "C").
> 
>     You don't need to compare with C, but rather with what A68 would
> look like if formatting had been controlled in other ways than "$....$".
> The burden is not so much what you, the user, have to learn, but what
> the implementer has to do.  Functions, strings, structures and so on
> have to be provided anyway;  formats are a serious added burden esp in
> the lexing [for which standard tools such as Lex and Yacc are suitable
> onlu with some difficulty].  [Note that the actual code for "printf"
> and friends is largely given in A68 in the RR -- the difficulty is not
> in providing much the same functionality, but in the parsing.]

Yes, I agree that the language implementers have a larger and more
demanding task to do.

Janis

Back to comp.lang.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

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