2 of 2
2
hash # and #hashtag
Posted: 19 November 2012 02:30 AM   [ Ignore ]   [ # 16 ]
RankRankRank
Total Posts:  205
Joined  2008-07-19

In computer software development, I have always read ‘#’ as ‘hash’, but I had a faint recollection that some early books didn’t call it that. I have a fairly extensive (and very eclectic) shelf of computer books behind me in the office, so I decided to do some digging.

The earliest reference I could find is in ‘Software Tools’ by Brian W Kernighan and P J Plauger (Addison-Wesley, 1976). The book defines the Ratfor programming language (a Fortran derivative), which uses # as a comment delimiter. The book call it the ‘sharp sign’: “In Ratfor, a sharp sign # anywhere on a line signals the beginning of a comment...”

(Incidentally Ratfor uses the ¬ symbol to represent a boolean NOT operator. I vaguely recall that PL/1 does the same, but it’s not a language I’ve ever needed to use.)

The next most obvious language to look at was C, which uses # as the initial character in preprocessor directives (an important part of the language’s design). The book that introduced C was “The C Programming Language” by Brian W Kernighan and Dennis M Ritchie (Prentice-Hall, 1978). Ingeniously, the book doesn’t call # anything at all. When it has to be mentioned, it just appears as a literal character: “Lines beginning with # communicate with the preprocessor.” The first occurrence in the books is even less explicit: “With the #define construction, at the beginning of a program you can define a symbolic name or symbolic constant...” All C users that I know pronounce #define as ‘hash-define’, but the original authoritative book offers no such guidance!

The next most obvious source to look at was “C: A Reference Manual” by Samuel P Harbison and Guy L Steele Jr (Prentice-Hall, 1984), which is probably the second most seminal book on C. # is named in a section defining the character set needed for C programs, where it is names as ‘number sign’. Everywhere else, it appears literally in text in the same manner as in Kernighan and Ritchie, but is never named.

An interesting rummage through computer history, but not as informative as I hoped it might be!

Profile
 
 
Posted: 19 November 2012 06:46 AM   [ Ignore ]   [ # 17 ]
Avatar
RankRankRankRankRank
Total Posts:  2524
Joined  2007-01-31

Then there’s |, which shows up on the keyboard as a broken line but prints as a solid line.  That one I know is used in computer programming, so it would make sense for it to be on a keyboard.

Also used, paired, in algebra to indicate absolute value, i.e., |x| = 2 regardless of whether x = 2 or x = -2.

Profile
 
 
Posted: 19 November 2012 07:34 AM   [ Ignore ]   [ # 18 ]
Avatar
RankRankRankRank
Total Posts:  784
Joined  2007-06-20
Dr. Techie - 15 November 2012 02:09 PM

Ah, so the British pound sign (£) replaces the US pound sign (#) as shift-3.

Yes, to get # on a British keyboard - or at least a Mac one, can’t remember about a PC one - you have to use alt-3.

Profile
 
 
Posted: 19 November 2012 11:22 AM   [ Ignore ]   [ # 19 ]
Avatar
RankRankRankRank
Total Posts:  599
Joined  2011-04-10
Faldage - 16 November 2012 04:09 AM

Then there’s |, which shows up on the keyboard as a broken line but prints as a solid line.  That one I know is used in computer programming…

and,

jtab4994 - 16 November 2012 06:45 AM

The | (pipe) is used all the time especially in Unix commands....

The vertical line, “|” is a symbol I have always heard referred to as the “pipe symbol”. It may be seen in command-line interface computing environments (such as may be seen in DOS, or Windows at the “command prompt”, and in UNIX-like operating systems such as Linuxes at a “terminal” or in a “terminal emulator” window).

It serves to indicate a function much like a pipe in plumbing, taking the output of the program to the left of the symbol and piping it to the input of the program to the right of the symbol.

Example: 

linuxes:

ls | more

-- list files in the default directory [ls], output piped to the input of [|] a program [more], that displays only one screen-full of the (possibly more than one screen-full long) list of files at a time, and then waits for user input (such as a “space” or an “enter/carriage-return") before displaying another screen-full of the list of files.

Windows command prompt (or DOS command):

type c:/*.* | more

-- list all files [*.*] in the “C:/” directory [type c:/*.*], output piped to the input of [|] a program [more], that displays only one screen-full of the (possibly more than one screen-full long) list of files at a time, and then waits for user input (such as a “space” or an “enter/carriage-return") before displaying another screen-full of the list of files.

[ Edited: 19 November 2012 11:31 AM by sobiest ]
Profile
 
 
Posted: 19 November 2012 12:30 PM   [ Ignore ]   [ # 20 ]
Avatar
RankRankRankRankRank
Total Posts:  2524
Joined  2007-01-31

“Ceci n’est pas une |.”

Profile
 
 
Posted: 19 November 2012 03:26 PM   [ Ignore ]   [ # 21 ]
Avatar
RankRankRankRank
Total Posts:  599
Joined  2011-04-10

Pareille trahison!

Profile
 
 
Posted: 22 November 2012 08:03 AM   [ Ignore ]   [ # 22 ]
Avatar
RankRankRankRank
Total Posts:  1257
Joined  2007-01-29

Hashtags - proceed with caution.

Profile
 
 
Posted: 22 November 2012 09:07 AM   [ Ignore ]   [ # 23 ]
RankRankRankRank
Total Posts:  1099
Joined  2007-03-21
Dr. Techie - 19 November 2012 12:30 PM

“Ceci n’est pas une |.”

Brilliant!

Profile
 
 
Posted: 22 November 2012 03:37 PM   [ Ignore ]   [ # 24 ]
Avatar
RankRankRankRankRank
Total Posts:  2553
Joined  2007-02-26

Hashtags - proceed with caution.

Sus scrofa? Pig’s arse.

Profile
 
 
   
2 of 2
2
 
‹‹ HD: Up Goer Five      Mathematical symbols ››