Search code examples
externb-lang

Extern or extrn in B?


I have a confusion between two B keywords.

The official B reference manual uses extrn keyword, while Wikipedia and C use extern.

As I don't know any good B compiler for x86, I can't spellcheck using a compiler.

So, what's the correct way of writing extern keyword in B - extern or extrn?


Solution

  • I'm no B programmer, but I would say extrn is right.

    Sources: here and here. Source 1 even explicitly states:

    What’s different compared to C?

    • extrn keyword instead of extern keyword.