Code Formatting Issue?
cubegleamer
Posts: 21
Sorry if this has been addressed before, I wasn't exactly sure how to search, tried a few things and nothing came up.
The issue is this:
I do this:
dvVPROJ = 5001:1:0 // NEC NP3151W PROJECTOR
dvPLASMA1 = 5001:2:0 // NEC P42XC10 PLASMA
dvVGA_SW = 5001:3:0 // EXTRON MVX44 VGA A SWITCHER WITH AUDIO
dvCODEC = 5001:4:0 // TANDBERG 3000 MXP 9600,N,8,1
dvREL = 5001:8:0 // RELAY PORTS FOR SCREEN
dvDVD = 5001:9:0 // SONY BDPS300 BLURAY DVD PLAYER
dvTBERG_IR = 5001:10:0 // TANDBERG IR RECEIVER AT CAMERA
And when the file is opened by someone else or on another machine it ends up like this (not always but often enough):
dvVPROJ = 5001:1:0 // NEC NP3151W PROJECTOR
dvPLASMA1 = 5001:2:0 // NEC P42XC10 PLASMA
dvVGA_SW = 5001:3:0 // EXTRON MVX44 VGA A SWITCHER WITH AUDIO
dvCODEC = 5001:4:0 // TANDBERG 3000 MXP 9600,N,8,1
dvREL = 5001:8:0 // RELAY PORTS FOR SCREEN
dvDVD = 5001:9:0 // SONY BDPS300 BLURAY DVD PLAYER
dvTBERG_IR = 5001:10:0 // TANDBERG IR RECEIVER AT CAMERA
What gives??!! Im starting with a new company where Ill be working on the same project in tandem with another programmer and this issue is gonna kill me.
Thanks in advance!
The issue is this:
I do this:
dvVPROJ = 5001:1:0 // NEC NP3151W PROJECTOR
dvPLASMA1 = 5001:2:0 // NEC P42XC10 PLASMA
dvVGA_SW = 5001:3:0 // EXTRON MVX44 VGA A SWITCHER WITH AUDIO
dvCODEC = 5001:4:0 // TANDBERG 3000 MXP 9600,N,8,1
dvREL = 5001:8:0 // RELAY PORTS FOR SCREEN
dvDVD = 5001:9:0 // SONY BDPS300 BLURAY DVD PLAYER
dvTBERG_IR = 5001:10:0 // TANDBERG IR RECEIVER AT CAMERA
And when the file is opened by someone else or on another machine it ends up like this (not always but often enough):
dvVPROJ = 5001:1:0 // NEC NP3151W PROJECTOR
dvPLASMA1 = 5001:2:0 // NEC P42XC10 PLASMA
dvVGA_SW = 5001:3:0 // EXTRON MVX44 VGA A SWITCHER WITH AUDIO
dvCODEC = 5001:4:0 // TANDBERG 3000 MXP 9600,N,8,1
dvREL = 5001:8:0 // RELAY PORTS FOR SCREEN
dvDVD = 5001:9:0 // SONY BDPS300 BLURAY DVD PLAYER
dvTBERG_IR = 5001:10:0 // TANDBERG IR RECEIVER AT CAMERA
What gives??!! Im starting with a new company where Ill be working on the same project in tandem with another programmer and this issue is gonna kill me.
Thanks in advance!
0
Comments
Basically just picture if the first set of device definitions has the equal signs and device numbers all lined up nice and neat, and the second set of code would look all jacked up with the alignment all over the place.
Code formatting on the forums is done by using the CODE tags. (Remove the spaces that I've inserted in the tags for it to work properly.
[ CODE ]
// Put stuff here
[ /CODE ]
Mine is set to 4 space tabs. But I use a giant font size cause of mah room-a-tizm and old tired eyes.
16 pt. Trebuchet.
That's kind of like saying, "real programers write in machine code, in binary." I like white space too, because in the pragmatic world, I have to be able to read it two years after I wrote it, and wall-of-unbroken-text doesn't pass as readable or parsable to my human eyes.
That said, over indentation does drive me crazy. I could never see the point of having the code start halfway to the vertical center of the workspace ... though I have to confess, it's more likely a tab translation when I see that than someone doing it deliberately.
Those of you that share code might find it useful to document your Tab and Indentation Preferences settings in a comment section near the beginning of the source code file. I got in the habit of doing this many years ago.
Good suggestion.
And thank you all for the help!
Obviously the middle line used tabs rather than spaces.
I do 5 & 8. 5 just because that's what i learned was the standard indent in a typing class i took in high school. Who knew i'd be able to remember that tid bit of knowledge and also have a chance to use it some 30+ years later. Still can't type worth a damn though.