|
|
|
![]() |
|
|||||||
|
||||||||
| View Poll Results: Who uses white space? | |||
| Yes, i make it so people can read my code |
|
39 | 69.64% |
| Yes, i make it so i think that others can resd it |
|
7 | 12.50% |
| No, only I can read my code |
|
3 | 5.36% |
| I think that only i can read my code |
|
3 | 5.36% |
| I don't understand the question. |
|
4 | 7.14% |
| Voters: 56. You may not vote on this poll | |||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#20
|
|||
|
|||
|
Re: "White space"
Sorry I didn't specify, adding or removing code does not change the weight!!
Anyways, here's some sample code from my joystick for FTC, this is how I like things whitespaced Code:
while (true) { //whitespace after an important conditional or loop
getJoystickSettings(joystick); //single linebreak for basic commands and function calling
setMotors("default"); //double linebreak when another main conditional is about to appear
if (joystick.joy1_y1 > 40 || joystick.joy1_y1 < -40) { //single linebreak for a final conditional in nests
motor[motorD] = joystick.joy1_y1;
}
}
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Championship Event - Where the "Random" Match Sorting Really "Shines" | Travis Hoffman | Championship Event | 57 | 19-04-2007 08:06 |
| New NEMO White Papers! "Creating a Killer Packet" and "25 Ways to Sponsor" | Jessica Boucher | Team Organization | 0 | 10-08-2005 10:55 |
| Team 1126 "Crazy Wheels" white paper | Alex Cormier | Technical Discussion | 1 | 25-10-2004 15:54 |
| "Thunderbirds" Vs. "Team America" Which one will rule the box office? | Elgin Clock | Chit-Chat | 3 | 07-09-2004 19:53 |
| Transcript: "The Space Shuttle Columbia Accident: What's Next?" | DanL | General Forum | 2 | 03-03-2003 21:35 |