Uses of the octothorp. (#)

Topics that can go away
jcb
Posts: 65
Joined: Thu Jul 07, 2022 4:36 pm

Re: Uses of the octothorp. (#)

Post by jcb »

alice wrote: Mon Sep 04, 2023 2:55 am
bradrn wrote: Mon Sep 04, 2023 1:49 am
jcb wrote: Mon Sep 04, 2023 1:34 am Programming Languages:
- heading marker (in markdown) (Maybe this is derived from IRC too ?)
- comment marker (in some programming languages)
Also in shebang lines in Unix scripts.
And comments in Unix scripts generally.

Also:

- C and C++ preprocessor directives
- catenation in C macros
- length operator in Lua
- "pound sign" in daily life in some countries
- beginning and end of word in sound changes
- raising of a musical note by a semitone (yes, this is pushing it a bit)
- prefix denoting hexadecimal numbers in some assembly languages
I remembered that HTML uses it (#) a bit too:
- defining colors: #ffff00 = magenta (Perhaps this was derived from how # was used to mark hexadecimal numbers in some earlier languages ?)
- marking identifiers (usually on headings) (Perhaps this derived from how # was used in IRC to mark channels ?)
But that's why I brought up the typewriter. They put it in ASCII because it was on the typewriter.
I messed it up again. I meant to say "It's somewhat surprising that they put it onto typewriters (and then into ASCII).".

Also note that some characters that were common on typewriters (¢§¼½¾ come to mind) didn't make it into ASCII.
That I can't say for sure, but # had uses in business, which was the first market for typewriters. Both your examples are what are apparently called dinkuses, which are the domain of printers, not writers.
Mmm. Other questionable exclusions that come to mind:
- the manicule ( https://en.wikipedia.org/wiki/Manicule ) (aka "index", "fist", and many other names) Although rarely used nowdays, it used to be much more popular in the past. (Here's it being used on the wanted poster for John Wilkes Booth: https://en.wikipedia.org/wiki/Manicule# ... er_new.jpg ) Perhaps they excluded it because they didn't consider it a character, but a picture, and implementation and appreciation for emojis was over 100 years away. But indeed, this character also lacks a business use.
Edit: smh at Google, which is now convinced I'm in the market for an old typewriter.
All hail the algorithm.
zompist
Site Admin
Posts: 2664
Joined: Sun Jul 08, 2018 5:46 am
Location: Right here, probably
Contact:

Re: Uses of the octothorp. (#)

Post by zompist »

jcb wrote: Tue Sep 05, 2023 4:12 pm I remembered that HTML uses it (#) a bit too:
- defining colors: #ffff00 = magenta (Perhaps this was derived from how # was used to mark hexadecimal numbers in some earlier languages ?)
This is a hex number, right. But rather to my surprise. HTML's BGCOLOR doesn't accept decimal numbers.

(I tried this on a page of mine: changed BGCOLOR="#AAE6AA" to BGCOLOR="11200170" which should be the equivalent decimal, and it doesn't choose the same color. A little more testing shows that Firefox, at least, thinks that BGCOLOR="AAE6AA" is the same as BGCOLOR="#AAE6AA". That is, the # is optional!)
Also note that some characters that were common on typewriters (¢§¼½¾ come to mind) didn't make it into ASCII.
There was certainly some arbitrariness at the margins, but surely these aren't too hard to understand. Bookkeeping, and therefore financial software, is happy to use $ alone. Programmers prefer to use decimals (or binary...) rather than fractions. It's easy to imagine an alternative universe where § made it in but not the vertical bar |.

But these all came pretty quickly after ASCII (i.e. codes 0-127). They're all in the US Windows code page, and §¢ are in the Mac set. And they're all in the Latin-1 Supplement page of Unicode, i.e. codes 128-255.
Post Reply