[identity profile] oldbloke.livejournal.com 2009-05-11 03:13 pm (UTC)(link)
Where's 72? Good old FORTRAN...

[identity profile] hoiho.livejournal.com 2009-05-11 03:47 pm (UTC)(link)
Ah, but that was 72 columns for code, with 8 at the start for sequence numbers. So, 80 columns per card.
fanf: (Default)

[personal profile] fanf 2009-05-11 03:56 pm (UTC)(link)
I thought it is 5 at the start for FORTRAN line numbers (loop labels), the 6th column marks continuation lines, and the 8 at the end are ignored by FORTRAN and usually used for a card sequence number. So more like 66 columns for actual code.

Writing C with 8 column tabs for indentation means code is usually less than 72 columns wide.

[identity profile] hoiho.livejournal.com 2009-05-11 04:01 pm (UTC)(link)
Yes, that's more correct than my half-remembered summary. It's a very long time since I wrote ruler-edge FORTRAN, as it has suppored free-format since the 1990 Fortran standard!

And using tab for indent is evil, bad, and wrong.
fanf: (Default)

[personal profile] fanf 2009-05-11 04:06 pm (UTC)(link)
I tend to think nowadays that tabs in general are EBW - exim's code is written to this rule. However a lot of code I have worked on in the recent past follows BSD/Linux kernel normal form and it's still my default.
lnr: Halloween 2023 (Default)

[personal profile] lnr 2009-05-11 04:13 pm (UTC)(link)
I use the tab *key* for indent, but emacs converts it into the right number of spaces for me (usually) and incidentally makes it easier to spot when I've got the code wrong.

[identity profile] hoiho.livejournal.com 2009-05-11 04:15 pm (UTC)(link)
That's the Right Way to do it!
ext_8103: (Default)

[identity profile] ewx.livejournal.com 2009-05-11 08:05 pm (UTC)(link)
You can customize indent-tabs-mode to nil to avoid it inserting actual tab characters. But you won't thank me for this if ever you edit the few file formats that require tabs (and that Emacs doesn't have any kind of exception for which I think includes makefiles); in that case your best bet is probably to set it locally from mode hooks.
lnr: Halloween 2023 (Default)

[personal profile] lnr 2009-05-12 11:28 am (UTC)(link)
I've not found I had to do anything to make it correctly indent code when I've been writing Perl, perhaps that's the default for perl-mode? I only find it gets it wrong if I have a regexp containing some sort of unmatched quote or opening bracket, in which case I end up having to append a comment closing it again or it refuses to line up properly :)
ext_8103: (Default)

[identity profile] ewx.livejournal.com 2009-05-12 11:36 am (UTC)(link)
Oh, it should certainly correctly indent by default. indent-tabs-mode determines whether it will insert only spaces or whether it will use tab characters (i.e. ASCII 0x09) to replace runs of spaces - which makes the file smaller but also makes the layout ambiguous (and I find can make navigation trickier as the cursor likes to go to one end of the tab or the other rather than in the middle).

[identity profile] oldbloke.livejournal.com 2009-05-11 04:54 pm (UTC)(link)
You have to count a loop label as part of the code, surely? You gotta find 'em somehow... But the continuation marker could be omitted, so 71...

Took me a whole day to spot I'd wandered into col73 once.