Groups | Search | Server Info | Login | Register


Groups > comp.lang.misc > #11730

Algol 68 / Genie - Spacing in standard transput

From Janis Papanagnou <janis_papanagnou+ng@hotmail.com>
Newsgroups comp.lang.misc
Subject Algol 68 / Genie - Spacing in standard transput
Date 2026-01-01 12:58 +0100
Organization A noiseless patient Spider
Message-ID <10j5ng8$23rl9$2@dont-email.me> (permalink)

Show all headers | View raw


Reading Lindsay / van der Meulen [*] I stumbled across the following
transput description:

  "When print is called, the mode of each item to be printed is
   identified, and appropriate action taken as follows:
       ints, reals, compls:
   If there is not room for the item on the current line (page),
   then newline (newpage) is called. Then the item is printed,
   _preceded by a space_ (if not at the beginning of a line),
   allowing sufficient positions to cope with the largest
   permissible value of that mode."

(Emphasis by me.) I assume that describes standard behavior.

Alas, with Genie I get for example with

     BEGIN
	INT a = 123, b = -45678, c = 9;
	INT d = max int, e = -max int, f = 0;
	REAL x = 1.3, y = 456e78, z = .9;
	COMPL r = d I e;
	print ((a, b, c, newline));
	print ((d, e, f, newline));
	print ((x, y, z, newline));
	print ((r, newline))
     END

this output

                 +123              -45678                  +9
+9223372036854775807-9223372036854775807                  +0
+1.30000000000000e  +0+4.56000000000000e +80+9.00000000000000e  -1
+9.22337203685477e +18-9.22337203685477e +18

instead of, say, (mind the data-separating spacing)

                 +123               -45678                   +9
+9223372036854775807 -9223372036854775807                   +0
+1.30000000000000e  +0 +4.56000000000000e +80 +9.00000000000000e  -1
+9.22337203685477e +18 -9.22337203685477e +18

or, for the last line with the complex number, even

+9.22337203685477e +18 i -9.22337203685477e +18

I think such spacing would be quite useful since I noticed that in
simple, mostly test tools I want that spacing between numeric data.
And I always (have to) add 'blank' tokens anyway to make it somewhat
readable.

As a non-native speaker I'm not sure whether "preceded by _a_ space"
means all the padding spaces. I interpreted it as "a [one] space" to
separate the numbers; formatting trash like "...000e  +0+4.560..."
in the example above would thus be alleviated; at least a bit.

I think, though, that indeed an additional separating space is meant
(otherwise the padding of "+123" at the start of the line above would
make no sense in the light of the quoted formulation).

Note: I'm just asking because I stumbled across the statement in the
document, and because I suffered from Genie's behavior; so I'd liked
some clarification. - The Genie docs have a lot of "deviations" from
the standard concerning transput, but this is not mentioned (presuming
that I didn't misinterpreted the Lindsey documents in the first place).

Janis

[*] 
https://inria.hal.science/hal-03027689/file/Lindsey_van_der_Meulen-IItA68-Revised.pdf

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


Thread

Algol 68 / Genie - Spacing in standard transput Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-01-01 12:58 +0100
  Re: Algol 68 / Genie - Spacing in standard transput Andy Walker <anw@cuboid.co.uk> - 2026-01-03 12:42 +0000
    Re: Algol 68 / Genie - Spacing in standard transput Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-01-03 21:49 +0000
      Re: Algol 68 / Genie - Spacing in standard transput Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-01-04 14:14 +0100
    Re: Algol 68 / Genie - Spacing in standard transput Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-01-04 14:04 +0100

csiph-web