🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

3 total messages Started by Paul Eggert Thu, 08 Oct 1992 00:20
\} at end of line sometimes elicits strange warning (groff -ww)
#73
Author: Paul Eggert
Date: Thu, 08 Oct 1992 00:20
19 lines
830 bytes
GROFF VERSION: 1.06

MACHINE: Sun Sparcstation 1

OS: SunOS 4.1.2

COMPILER: gcc 2.2.2

INPUT FILES:
	.if 1 \{\
	.nr x 1 \}

COMMAND LINE: groff -ww

DESCRIPTION OF INCORRECT BEHAVIOUR:
	<standard input>:2: warning: `\}' where number expected

	Is a warning really called for here?
	Similarly for `.sp \}', etc.
\} at end of line sometimes elicits strange warning (groff -ww)
#74
Author: James Clark
Date: Mon, 12 Oct 1992 08:04
46 lines
1833 bytes
   INPUT FILES:
	   .if 1 \{\
	   .nr x 1 \}

   COMMAND LINE: groff -ww

   DESCRIPTION OF INCORRECT BEHAVIOUR:
	   <standard input>:2: warning: `\}' where number expected

	   Is a warning really called for here?
	   Similarly for `.sp \}', etc.

If you don't want these warnings, you can disable them with
`-Wright-brace'.

`\}' behaves in a rather bizarre way: it disappears much later than
might be expected.  If you use `\}' in a place where a numeric
argument is expected, troff will behave as if an invalid argument had
been supplied rather than as if no argument had been supplied.  This
is true for both GNU troff and traditional troff.  Traditional troff
and GNU troff differ in their treatment of requests that have invalid,
optional arguments: traditional troff sometimes ignores the entire
request, sometimes behaves as if the invalid argument was missing, and
sometimes behaves as if the argument was zero; GNU troff usually
ignores the request (perhaps it would be better if it always treated
an invalid, optional argument as missing.)

For example, this

   .ps 10
   .ps 8
   .if 1 \{\
   .ps \}
   .tm \n(.s

will print `8' not `10'.

These problems can all be avoided by putting the `\}' on a separate
line:

   .if 1 \{\
   .   nr x 1
   .\}

James Clark
jjc@jclark.com
\} at end of line sometimes elicits strange warning (groff -ww)
#75
Author: GNU Mailing List Maintenance
Date: Tue, 13 Oct 1992 05:45
46 lines
1976 bytes
   INPUT FILES:
	   .if 1 \{\
	   .nr x 1 \}

   COMMAND LINE: groff -ww

   DESCRIPTION OF INCORRECT BEHAVIOUR:
	   <standard input>:2: warning: `\}' where number expected

	   Is a warning really called for here?
	   Similarly for `.sp \}', etc.

If you don't want these warnings, you can disable them with
`-Wright-brace'.

`\}' behaves in a rather bizarre way: it disappears much later than
might be expected.  If you use `\}' in a place where a numeric
argument is expected, troff will behave as if an invalid argument had
been supplied rather than as if no argument had been supplied.  This
is true for both GNU troff and traditional troff.  Traditional troff
and GNU troff differ in their treatment of requests that have invalid,
optional arguments: traditional troff sometimes ignores the entire
request, sometimes behaves as if the invalid argument was missing, and
sometimes behaves as if the argument was zero; GNU troff usually
ignores the request (perhaps it would be better if it always treated
an invalid, optional argument as missing.)

For example, this

   .ps 10
   .ps 8
   .if 1 \{\
   .ps \}
   .tm \n(.s

will print `8' not `10'.

These problems can all be avoided by putting the `\}' on a separate
line:

   .if 1 \{\
   .   nr x 1
   .\}

James Clark
jjc@jclark.com
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads