Blockland Forums > General Discussion
How do you indent when you code?
<< < (3/5) > >>
Sheath:

--- Code: ---function killPlayer() {
Self Delete();}
--- End code ---

I'm terrible lol
PurpleMetro:

--- Quote from: Sheath on November 18, 2012, 12:55:44 AM ---
--- Code: ---function killPlayer() {
Self Delete();}
--- End code ---

I'm terrible lol

--- End quote ---
i-i think i just puked a little. ;_;
Kingdaro:
i do the first

because i regularly code with lua, i like to think of the left curly brace as a "then" or "do", and the right brace as "end". with functions, i just like not having another entire line below the function name.

if (thing) {
  //stuff
}

while (thing) {
 //stuff
}


translates to


if thing then
  --stuff
end

while thing do
  --stuff
end



--- Quote from: Evar678 on November 17, 2012, 07:43:25 PM ---This way is the traditional, and easiest to read way.

--- End quote ---
it just annoys the mother loving forget out of me :U
Sheath:

--- Quote from: PurpleMetro on November 18, 2012, 01:02:59 AM ---i-i think i just puked a little. ;_;

--- End quote ---

Yeah its really bad practice.

But I hate how wasteful it is adding indents and spaces. It just looks so big. Perhaps its a bit of a weird OCD thing, I can't stand doing anything other than making it as condensed as possible. RAWR.
pecon98:

--- Code: ---function aFunction(%argument)
{
functionality();
}

--- End code ---
That's how I generally try to format my code.
Navigation
Message Index
Next page
Previous page

Go to full version