Trigraphs

R

Richard Bos

There's no hash key.....

Really? I thought that was just on UK keyboards. What do you have
on shift-3?[/QUOTE]

Mine has a hash. I've no idea what Mark is using, but it's not a normal
Mac US keyboard.

Richard
 
M

Michael Wojcik

EBCDIC has many funky versions, but do you actually know ones that do
not have the characters of the C trigraph set (# [ \ ] ^ { | } ~)? (This
is a genuine question, not an attempt at being snarky.)

Yes. The standard US EBCDIC "coded graphic character set" (which
consists of character set 600 encoded using code page 500) doesn't
have the square brackets, for example, or the tilde. And those
characters don't appear on the standard US keyboards for some IBM
terminal types for systems that have C implementations available,
such as the 5250.

00640-00500 also seems to be missing the number sign, though since
that does appear in most older IBM character sets (eg A, AE, 930, and
USS), it's probably widely available on EBCDIC systems. I don't
recall offhand if it appears on the US 5250 keyboard.

Hmm. I've now put my reference away, but I think the "broken"
vertical bar character is missing from most EBCDIC keyboards as well.
However, the EBCDIC C compilers I've used will also accept EBCDIC's
"solid vertical bar" character in its place, and that does appear on
the EBCDIC keyboards I've used.

It's the lack of square brackets that are really annoying. Why EBCDIC
includes the cent symbol, which is of precious little use to anyone,
and not the square brackets, which are widely used in English, is a
mystery to me. (Technically, EBCDIC doesn't "omit" the square
brackets, but their code points are device dependent, which is about
as bad. There was a thread on this in alt.folklore.computers a
while back if anyone's curious.)

Daniel Rudy's evaluation that trigraphs are no longer necessary
"today" is faulty. They're just as "necessary" now as they ever
were. Just how necessary they ever were is a different question; as
others have pointed out, it's debatable whether the language should
have sought to solve this problem, and whether trigraphs were a good
approach to doing so.

--
Michael Wojcik (e-mail address removed)

Thanatos, thanatos! The labourer, dropping his lever,
Hides a black letter close to his heart and goes,
Thanatos, thanatos, home for the day and for ever. -- George Barker
 
G

Gary

Jordan Abel said:
What's on shift-3?

I think the OP was perhaps referring to the UK Mac keyboard, which has no #
key. On Shift+3 I think there is £ although I'm not near my Mac at the
moment.

To get # you have to use Option-3 or Shift-Option-3 or some other finger
gymnastics. Typing trigaph ??= is easier.
 
J

Jordan Abel

EBCDIC has many funky versions, but do you actually know ones that do
not have the characters of the C trigraph set (# [ \ ] ^ { | } ~)? (This
is a genuine question, not an attempt at being snarky.)

Yes. The standard US EBCDIC "coded graphic character set" (which
consists of character set 600 encoded using code page 500) doesn't
have the square brackets, for example, or the tilde. And those
characters don't appear on the standard US keyboards for some IBM
terminal types for systems that have C implementations available,
such as the 5250.

00640-00500 also seems to be missing the number sign, though since
that does appear in most older IBM character sets (eg A, AE, 930, and
USS), it's probably widely available on EBCDIC systems. I don't
recall offhand if it appears on the US 5250 keyboard.

Hmm. I've now put my reference away, but I think the "broken"
vertical bar character is missing from most EBCDIC keyboards as well.
However, the EBCDIC C compilers I've used will also accept EBCDIC's
"solid vertical bar" character in its place, and that does appear on
the EBCDIC keyboards I've used.

The ascii character has always been a solid vertical bar as far as i
know - a broken vertical bar glyph erroneously appears in that position
on some PC video cards, and from there it's often printed that way on US
keyboards as more and more people think that's how it's supposed to
look, but broken vertical bar is at latin-1 0xA6.
It's the lack of square brackets that are really annoying. Why EBCDIC
includes the cent symbol, which is of precious little use to anyone,

You only think that because you're used to not having it available
and not the square brackets, which are widely used in English, is a

Widely used? There's only one common english use for it that i can think
of.
 
M

Mark McIntyre

There's no hash key.....

Really? I thought that was just on UK keyboards. What do you have
on shift-3?[/QUOTE]

No idea. That mac is currently holding fort in my loft, as it wouldn't
accept an upgrade to OSX. It might have been a UK keyboard tho I'd be
surprised since it was bought in the US.
Mac UK keyboards have the sterling symbol, and hash is available as
alt-3, which is a real pain if you use normal keyboards too.

Yes, figured it was there somewhere. It just ended up being more
convenient to write my code on a PC, save on a shared drive and
compile it on the mac.

Or use trigraphs of course :)
 
M

Mark McIntyre

Really? I thought that was just on UK keyboards. What do you have
on shift-3?

Mine has a hash. I've no idea what Mark is using, but it's not a normal
Mac US keyboard.[/QUOTE]

I'm quite happy concede it might have been a UK keyboard. If anyone
/really/ wants to know I can dig it out of the loft.

Main thing is, it doesn't have a hash key and discovering the magic
keycombinations kinda defeated one of the supposed virtues of a mac.
 
M

Michael Wojcik

The ascii character has always been a solid vertical bar as far as i
know - a broken vertical bar glyph erroneously appears in that position
on some PC video cards, and from there it's often printed that way on US
keyboards as more and more people think that's how it's supposed to
look, but broken vertical bar is at latin-1 0xA6.

Right. I think I may have confused which one was missing from the
US EBCDIC keyboards I've used, too. Thanks for the correction.
You only think that because you're used to not having it available

No, I think that because it's of precious little use, as far as I
can tell. I have it available to me when I write in longhand; I
have it available with little effort on the computers that I use
daily. I never need it. I almost never see it in anything printed
in, say, the last fifty years.
Widely used? There's only one common english use for it that i can think
of.

So? That doesn't mean they're not widely used. There's only one
common English use for parentheses, too, yet they appear all over
the place.

They're very common in much of the English prose *I* read, for
editorial insertion and for citation. The _Oxford Companion_ also
notes frequent use in dictionaries, "texts of plays", and "reports of
meetings or proceedings". They also appear in some specialized uses
(eg syntax diagrams), though those were not prominent, as far as I
know, when the original EBCDIC character set was defined.

However, editorial insertion alone makes square brackets more useful
than the cent sign. The cent sign has an obvious and completely
suitable alternative: the value scaled by 1/100 and the dollar sign,
if available, or suitable notation (eg "USD") if not. No such
entirely suitable alternative exists for square brackets.

This is now off-topic for CLC, IMO, having drifted away from the
question of trigraphs; but I certainly don't see any grounds for
arguing that the cent sign is more useful in an English character set
than the square brackets.

--
Michael Wojcik (e-mail address removed)

There are many definitions of what art is, but what I am convinced art is not
is self-expression. If I have an experience, it is not important because it
is mine. It is important because it's worth writing about for other people,
worth sharing with other people. That is what gives it validity. (Auden)
 
J

Jordan Abel

Right. I think I may have confused which one was missing from the
US EBCDIC keyboards I've used, too. Thanks for the correction.


No, I think that because it's of precious little use, as far as I
can tell. I have it available to me when I write in longhand; I
have it available with little effort on the computers that I use
daily. I never need it. I almost never see it in anything printed
in, say, the last fifty years.


So? That doesn't mean they're not widely used. There's only one
common English use for parentheses, too, yet they appear all over
the place.

They're very common in much of the English prose *I* read, for
editorial insertion and for citation. The _Oxford Companion_ also
notes frequent use in dictionaries, "texts of plays", and "reports of
meetings or proceedings". They also appear in some specialized uses
(eg syntax diagrams), though those were not prominent, as far as I
know, when the original EBCDIC character set was defined.

However, editorial insertion alone makes square brackets more useful
than the cent sign. The cent sign has an obvious and completely
suitable alternative: the value scaled by 1/100 and the dollar sign,

Or whatever other currency sign [I've seen arguments against using ¢ for
euro cents or whatever, and they're quite weak]
if available, or suitable notation (eg "USD") if not. No such
entirely suitable alternative exists for square brackets.

This is now off-topic for CLC, IMO, having drifted away from the
question of trigraphs; but I certainly don't see any grounds for
arguing that the cent sign is more useful in an English character set
than the square brackets.

Could the reason have been that it appeared on traditional typewriter
layouts? and maybe square brackets did not.
 
L

lawrence.jones

Michael Wojcik said:
It's the lack of square brackets that are really annoying. Why EBCDIC
includes the cent symbol, which is of precious little use to anyone,
and not the square brackets, which are widely used in English, is a
mystery to me.

I don't mind the cent sign so much, but the logical "not" symbol?!?

-Larry Jones

It's SUSIE! It's a GIRL! Santa would understand! -- Calvin
 
L

lawrence.jones

Jordan Abel said:
The ascii character has always been a solid vertical bar as far as i
know - a broken vertical bar glyph erroneously appears in that position
on some PC video cards, and from there it's often printed that way on US
keyboards as more and more people think that's how it's supposed to
look, but broken vertical bar is at latin-1 0xA6.

The original ASCII standard also rendered it as a broken bar, which lead
to the confusion about whether it was "supposed" to be a solid bar or a
broken bar. That was fixed in the 1977 revision, I believe, but by that
time the broken bar was already solidly entrenched in some contexts.

-Larry Jones

Oh yeah? You just wait! -- Calvin
 
D

Dik T. Winter

> The ascii character has always been a solid vertical bar as far as i
> know - a broken vertical bar glyph erroneously appears in that position
> on some PC video cards, and from there it's often printed that way on US
> keyboards as more and more people think that's how it's supposed to
> look, but broken vertical bar is at latin-1 0xA6.

The first part is not correct. The first ASCII standard of 1965 had a solid
vertical bar, but although that standard was approved, it was never
published and never used. In the second (and last) ASCII standard of 1967
it was replaced by a broken bar. However because of much controversy in
the US, it was decided that in actual use the exclamation mark could be
rendered as an unbroken vertical bar. I do not think that actually has
ever been done, and subsequently the broken bar was replaced in more and
more places by the unbroken bar. It is possible that at one stage the
ASCII standard has been adapted to the prevalent usage. At least in the
ISO standard of 1973 it was again an unbroken bar. EBCDIC had both
bars from the start.
 
D

Dik T. Winter

>
> I don't mind the cent sign so much, but the logical "not" symbol?!?

Why not? The first code I used in programming had the logical "not", "and"
and "or" (and those were *not* & and |), together with a lower 10. That
was pretty useful as the programming language used them.
 
J

Jordan Abel

The first part is not correct. The first ASCII standard of 1965 had a solid
vertical bar, but although that standard was approved, it was never
published and never used. In the second (and last) ASCII standard of 1967
it was replaced by a broken bar. However because of much controversy in
the US, it was decided that in actual use the exclamation mark could be
rendered as an unbroken vertical bar. I do not think that actually has
ever been done, and subsequently the broken bar was replaced in more and
more places by the unbroken bar. It is possible that at one stage the
ASCII standard has been adapted to the prevalent usage. At least in the
ISO standard of 1973 it was again an unbroken bar. EBCDIC had both
bars from the start.

Regardless, in the standard of today, broken bar is at U+00A6, not U+007C
 
D

Dik T. Winter

>
> Regardless, in the standard of today, broken bar is at U+00A6, not U+007C

Yes, so what? U+00A6 is not defined in any ASCII standard at all. I thought
it was about ASCII.
 
M

Michael Wojcik

Could the reason have been that it appeared on traditional typewriter
layouts? and maybe square brackets did not.

When I had a similar discussion in alt.folklore.computers some time
back someone made a similar suggestion. The (manual) typewriters I
learned to type on had square brackets; they may have also had the
cent sign. The latter strikes me as an odd choice, since it's easy
to compose on a manual typewriter (overtype c with a colon; do a
half reverse line feed if you want it vertically centered on the
line), but I'm not in the typewriter business, and maybe many
typewriters did come with the cent sign.

IIRC, those typewriters had both square brackets on the same key,
and one was shifted, which was slightly annoying.

I recall dredging up some interesting material on the history of
EBCDIC, but never did find any satisfactory answer to the question.
I also browsed around typewriter histories a bit, and discovered
that, for example, the 1967 "IBM SELECTRIC Composer" (whatever that
was) used a Selectric-style "golf ball" print element that included
square brackets and various "sorts" like the dagger and common
fractions, but not the cent sign.

Maybe someone at IBM just didn't like editorial insertions. I can't
see Watson sitting down with the new issue of _Critical Inquiry_...

--
Michael Wojcik (e-mail address removed)

Memory, I realize, can be an unreliable thing; often it is heavily coloured
by the circumstances in which one remembers, and no doubt this applies to
certain of the recollections I have gathered here. -- Kazuo Ishiguro
 
J

Jordan Abel

When I had a similar discussion in alt.folklore.computers some time
back someone made a similar suggestion. The (manual) typewriters I
learned to type on had square brackets; they may have also had the
cent sign. The latter strikes me as an odd choice, since it's easy
to compose on a manual typewriter (overtype c with a colon; do a
half reverse line feed if you want it vertically centered on the
line), but I'm not in the typewriter business, and maybe many
typewriters did come with the cent sign.

Type samples I found online with a GIS after making that wild assertion
show it on shift-6. This may not have been universal.
I recall dredging up some interesting material on the history of
EBCDIC, but never did find any satisfactory answer to the question.
I also browsed around typewriter histories a bit, and discovered
that, for example, the 1967 "IBM SELECTRIC Composer" (whatever that
was) used a Selectric-style "golf ball" print element that included
square brackets and various "sorts" like the dagger and common
fractions, but not the cent sign.

Link?
 
D

Dik T. Winter

>
> When I had a similar discussion in alt.folklore.computers some time
> back someone made a similar suggestion. The (manual) typewriters I
> learned to type on had square brackets; they may have also had the
> cent sign.

Strange enough, none of the 21 different US keyboard layouts from around
1970 by Olympia (the typewriter producer) has them. Yes, I have a book
that displays all about 300 keyboard layouts by Olympia at that time.
(And when I bought my first typewriter it was modified so that it had a
clearly distinctive 0 and 1.)
> I recall dredging up some interesting material on the history of
> EBCDIC, but never did find any satisfactory answer to the question.

According to an e-mail I received from Bob Bemer: on 6-th July 1961
there was general agreement (within IBM, SHARE and GUIDE, the latter
two being IBM user groups) to include the square brackets in BCD.
But they were already included in the coding for the IBM Stretch
in January 1960 (*). I think this was to enable coding in Algol-60.
Also the backslash was nominated for inclusion to enable Algol-60
"and" ("/\") and "or" ("\/") as 2-character representations. And,
as far as I have been able to ascertain, character codes with the
square brackets came up only in the very early 60s, and there is
proof that at least some of them are motivated by their use in
Algol-60 (**) (which is also the source for their use in C). From
memory I do not know whether they were already in the 1958 Algol
proposal. I have found *no* pre-1960 coding that has them.

So my conclusion is that the main reason for inclusion has been the
use of them in Algol-60 and (possibly) its predecessor Algol-58.

(*) The design is of course earlier, but remember that Backus, who
presented the talk at the Unesco conference about the Algol proposal
in 1958 was working at IBM.

(**) Apart from the Stretch, the earliest code I know with the square
brackets is for the LGP-30, which was used in Dartmouth for development
in the direction of Algol-60. Bemer thinks that the presence of the
square brackets might have preceded the presence in Stretch. I tend to
disagree. It is extremely difficult to ascertain the date from which
character codes come, and some machines switch character sets during
their lifetime. I really think it is the Algol motivation. Anyhow,
the first occurence was either on Stretch or on LPG-30 with the other
in second place.
 
D

Dave Thompson

On 11 Nov 2005 23:40:16 GMT, (e-mail address removed) (Michael Wojcik)
wrote:

(Sorry for the late reply; it took me a while to check out your
reference elsethread, which actually is one of a whole group of
articles on the Composer that appears to have been a special issue,
and brought back quite a few memories.)
You said upthread "I almost never see it in anything printed
in, say, the last fifty years." I remember seeing it a _lot_ in the
'60s and '70s, when the (US) dollar and cent were worth rather more
than now, and some but less so since, even up to this week, in retail
advertisements (groceries, fast food and diners etc., drugstore
'convenience' items, office supplies, etc., etc.) and some catalogs.
FWIW advertisements were (in my lifetime) rarely typewritten, although
some catalogs were: I remember several selling electronic components,
such as Digi-Key. And instructions for small-value transactions in
classified ads and elsewhere: "Send 25\cent and SASE for your very own
When I had a similar discussion in alt.folklore.computers some time
back someone made a similar suggestion. The (manual) typewriters I
learned to type on had square brackets; they may have also had the

Hmmm. The manuals I learned on and used in midwest US, and was told
were standard (I think then ASA), had centsign but not brackets. I
remember Smith-Corona[-Marchant?] and Olivetti and maybe Remington (I
believe pre-Rand). This was an issue for me since they were needed, as
you noted, for references and edited quotes in papers such as I wrote
in high school, which were only nominally scholarly but followed those
rules; and I had to insert by hand, or use superscripts or careful or
creative quotation.
cent sign. The latter strikes me as an odd choice, since it's easy
to compose on a manual typewriter (overtype c with a colon; do a
half reverse line feed if you want it vertically centered on the
line), but I'm not in the typewriter business, and maybe many
typewriters did come with the cent sign.
When I started encountering gear that didn't have centsign, I used c
plus slash. I wasn't and wouldn't be confident colon would position
properly. And even when provided or handwritten IME it often had the
diagonal continuous through the center anyway.
IIRC, those typewriters had both square brackets on the same key,
and one was shifted, which was slightly annoying.

I recall dredging up some interesting material on the history of
EBCDIC, but never did find any satisfactory answer to the question.
I also browsed around typewriter histories a bit, and discovered
that, for example, the 1967 "IBM SELECTRIC Composer" (whatever that
was) used a Selectric-style "golf ball" print element that included
square brackets and various "sorts" like the dagger and common
fractions, but not the cent sign.
The Composer was a fascinating "poor man's typesetter". It used a
Selectric chassis with the "rotate, tilt, and push" golfball carrier
moving across a fixed platen, but with proportional spacing -- 3/9 to
9/9 of an adjustable basis, and the paper advance adjustable in
similarly small increments, according to the journal 1pt up to 20pt,
although I thought I recalled 1/2pt increment and we only needed to
use up to about 15. (True printer's points weren't exactly 1/72in but
IBM and several other people rounded off.)

This was all done mechanically and was somewhat delicate and prone to
break more than most IBM equipment which at least then was generally
very robust. It could use ordinary paper, but produced best image
quality (which is what you bought it to get) with carbon-film ribbon
and glossy 'clay' paper.

There were dozens of elements (golfballs) available with different
typefaces in a range of sizes, and while basic characters like letters
numerals . , ? ! : ; - / ( ) and quotes were the same on all fonts
except a few special 'pi' or 'symbol' fonts, some of the less common
character positions varied on different fonts (and you needed a chart
of which input key produced what output character). I'm certain at
least some fonts had (and I used) brackets but I think not all. I
don't recall if any had centsign, which we didn't need/use in the mid
'70s for (college) news. I don't think any of the fonts we used had
composed fractions, although I can't exclude that others did, and only
a few had ligatures (fi, fl, etc.) which most 'real' typesetting
equipment did and was (quite) proud of.

ObSomewhatComputer: what the place I worked at actually had was
an even more amazing kludge, the _Magnetic Tape_ Selectric Composer.
This avoided the need for a person to type copy twice in order to
compute and then apply the correct interword space for 'justified'
(both margins aligned) text, or to center or right-justify lines. It
had a small (for those days) computer, I would estimate in retrospect
comparable to an 8008, built into a roughly-normal office desk, which
read input from the type of magnetic tape cartridges used (and
prepared) on the word-processing Mag Tape Selectric _Typewriter_;
computed justification or other alignment; and then output by having a
series of motor/clutch-driven fingers pull on hooks on the bottom of
the keyboard (keylevers) of a Composer mounted on top, so you could
watch the keys being 'magically' depressed much like the old player
pianos you now see only in old movies. The computer wasn't powerful
enough to decide hyphenation though, so when that was needed it would
tab the Composer over from the end of the previous line into a
(discardable) work area, print out the word that exceeded the
justification zone, wait for the operator to punch in which character
to hyphenate (or just break) at, compute the justification, then
carriage-return back to the good area and output the line.

(There was also an IBM typewriter model, IIRC Executive, with
proportional spacing on traditional=typebasket against moving platen
mechanism. This couldn't provide easy font changing, of course.)
Maybe someone at IBM just didn't like editorial insertions. I can't
see Watson sitting down with the new issue of _Critical Inquiry_...

- David.Thompson1 at worldnet.att.net
 
M

Michael Wojcik

On 11 Nov 2005 23:40:16 GMT, (e-mail address removed) (Michael Wojcik)
wrote:

(Sorry for the late reply; it took me a while to check out your
reference elsethread, which actually is one of a whole group of
articles on the Composer that appears to have been a special issue,
and brought back quite a few memories.)

Quite all right; I was rather late in reading it. But it was very
interesting. Thanks for posting it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,172
Messages
2,570,934
Members
47,477
Latest member
ColumbusMa

Latest Threads

Top