(no subject)

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

(no subject)

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

(no subject)

Date: 2009-05-11 03:56 pm (UTC)
fanf: (Default)
From: [personal profile] fanf
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.

(no subject)

Date: 2009-05-11 04:01 pm (UTC)
From: [identity profile] hoiho.livejournal.com
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.

(no subject)

Date: 2009-05-11 04:06 pm (UTC)
fanf: (Default)
From: [personal profile] fanf
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.

(no subject)

Date: 2009-05-11 04:13 pm (UTC)
lnr: Halloween 2023 (Default)
From: [personal profile] lnr
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.

(no subject)

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

(no subject)

Date: 2009-05-11 08:05 pm (UTC)
ext_8103: (Default)
From: [identity profile] ewx.livejournal.com
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.

(no subject)

Date: 2009-05-12 11:28 am (UTC)
lnr: Halloween 2023 (Default)
From: [personal profile] lnr
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 :)

(no subject)

Date: 2009-05-12 11:36 am (UTC)
ext_8103: (Default)
From: [identity profile] ewx.livejournal.com
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).

(no subject)

Date: 2009-05-11 04:54 pm (UTC)
From: [identity profile] oldbloke.livejournal.com
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.

February 2025

S M T W T F S
      1
2345678
9101112131415
16171819202122
232425262728 

Most Popular Tags

Expand Cut Tags

No cut tags