nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 30 Aug 2011 03:14 PM |
I don't use spaces when dealing with '*, -, =, =" symbols, and I don't use spaces after a comma.
Basically, I don't really space things out. Is this a bad habit? Or should I just get into using spaces? |
|
|
| Report Abuse |
|
|
cymru72
|
  |
| Joined: 26 Jan 2008 |
| Total Posts: 4362 |
|
|
| 30 Aug 2011 03:15 PM |
| Not really bad, I like to have tabbed, tidy code :3 |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 30 Aug 2011 03:16 PM |
| Yeah, I always tab, my code is often neat, but I usually, if not always see people use spaces. |
|
|
| Report Abuse |
|
|
|
| 30 Aug 2011 03:16 PM |
You should space:
Before and after a - and + sign. After a coma
/, *, ^, and % don't usually get given spaces because of order of operations - Plus an minus separate two pieces of maths.
Ex:
5*6 + 2*6
Will be the equivalent of
(5*6) + (2*6)
So it's easier to notice math errors. |
|
|
| Report Abuse |
|
|
cymru72
|
  |
| Joined: 26 Jan 2008 |
| Total Posts: 4362 |
|
| |
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
| |
|
LocalChum
|
  |
| Joined: 04 Mar 2011 |
| Total Posts: 6906 |
|
|
| 30 Aug 2011 03:25 PM |
I tab
Sometimes I don't put spaces when defining/comparing
Eg:
if (true==false) then end-- non-spaced if (true == false) then end -- spaced OYUS93=true -- non-spaced OYUS93 = true -- spaced |
|
|
| Report Abuse |
|
|
owen0202
|
  |
| Joined: 27 Feb 2008 |
| Total Posts: 6912 |
|
|
| 30 Aug 2011 03:29 PM |
Nospaces please.
a=1 b=a+1 c=b*2
|
|
|
| Report Abuse |
|
|
Aaaboy97
|
  |
| Joined: 05 Apr 2009 |
| Total Posts: 6612 |
|
| |
|
|
| 30 Aug 2011 03:35 PM |
No spaces look ugly. I put as many spaces as possible, sometimes two spaces instead of one, to help break it up (so that you get the similar features trapping was talking about). Only in complex code, though, if it's something simple like what trapping said I do it like that. |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 30 Aug 2011 03:40 PM |
| I don't use spaces when minifying |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 30 Aug 2011 04:31 PM |
I don't like using spaces because 1; I'm used to not spacing. 2; It's a hassle. |
|
|
| Report Abuse |
|
|
owen0202
|
  |
| Joined: 27 Feb 2008 |
| Total Posts: 6912 |
|
|
| 30 Aug 2011 05:47 PM |
| nospaces r pro, i fink spaces r ugly |
|
|
| Report Abuse |
|
|
|
| 30 Aug 2011 05:48 PM |
| I don't use spaces on assigning/mathing/checking table values, but I use spaces everywhere else. |
|
|
| Report Abuse |
|
|
|
| 30 Aug 2011 05:59 PM |
me, always spaces after a comma
Only time I use spaces in maths is around addition and subtraction unless it's a complex statement or in a function (i.e. math.floor(a+0.5))
|
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 30 Aug 2011 06:15 PM |
I never use a space after a comma, it just looks ugly.
Eg;
Vector3.new(0,0,0) Instance.new("Part",workspace) |
|
|
| Report Abuse |
|
|