venta: (Default)
[personal profile] venta
Last night, ChrisC idly asked me why, on Twitter, hashtags are called hashtags.

Simple, I said, because they start with a #.

But, he said, they're called hashtags in the US, where the # is known as a pound sign.

I have a vague idea that # is sometimes called a pound sign; it's always struck me as a bit odd. I've always assumed it was related to the days when character sets were limited and it was used in place of £.

But of course they're hashtags. After all, they may call it a pound sign, but they don't pronounce it "pound".

But, said ChrisC, they do. In particular, in the US, C programmers talk about "pound defines".

This is just a bit of stray C syntax. Suppose you want your programme to limit the number of available heffalumps to 7, you can keep checking that:

heffalumps < 7

If you're worried that in the future you might want to allow more heffalumps you could do something like this:

#define MAX_HEFFALUMPS 7

and every time you want to check, you can just say:

heffalumps < MAX_HEFFALUMPS

Every time you write MAX_HEFFALUMPS a magical but dumb thing called the preprocessor will slavishly ensure that that gets treated as a 7. As computers improve and can fit more heffalumps in, you can just update it to:

#define MAX_HEFFALUMPS 24

instead of having to change it in lots of different places. This is commonly referred to as a "hash define". Lots of other instructions begin with the # character. See here for more detail than you can possibly want.

I'm sure at least someone will take serious issue with my AA Milne-based description of what the preprocessor does.

Pound defines?

Yes, he says. And pound includes. And pound ifs. And so on.

This is madness. Why wasn't I told? And can they be made to stop it?

And does anyone know why our American friends don't talk of poundtags?

Date: 2010-09-29 02:52 pm (UTC)
From: [identity profile] beckyc.livejournal.com
After all, they may call it a pound sign, but they don't pronounce it "pound".

Sure they do. Haven't you ever been on teleconferences where they tell you to press the pound key and you're so busy wrestling with skype to get it to type in the numbers right that you end up doing it three times? Or is that last part just me not knowing how to operate a phone?

Date: 2010-09-29 02:53 pm (UTC)
From: [identity profile] venta.livejournal.com
Haven't you ever been on teleconferences

Nope :)

Date: 2010-09-29 02:54 pm (UTC)
From: [identity profile] beckyc.livejournal.com
Also I work for a USian software company and I've never heard them talking about pound define anything now that I come to think of it.

Date: 2010-09-29 02:55 pm (UTC)
From: [identity profile] venta.livejournal.com
There is a slim chance that ChrisC was winding me up (in which case, it worked) but he did assumre me he wasn't!

Date: 2010-09-29 02:57 pm (UTC)
From: [identity profile] beckyc.livejournal.com
I'm just trying to think if there's anyone I can ask in the US who wouldn't think I was crazy for asking (that's rather frowned upon) and I'm drawing a blank. I'll have to wait until one of them is over and we're at the pub and they've had a few beers.

Date: 2010-09-29 04:06 pm (UTC)
From: [identity profile] mrlloyd.livejournal.com
My US made phone conferencing software asks me to press the pound key.

Profile

venta: (Default)
venta

December 2025

S M T W T F S
 123456
78910111213
14151617181920
212223 24252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Dec. 27th, 2025 04:15 pm
Powered by Dreamwidth Studios