×

Langue

Fermer
Atelier 801
  • Forums
  • Dev Tracker
  • Connexion
    • English Français
      Português do Brasil Español
      Türkçe Polski
      Magyar Română
      العربية Skandinavisk
      Nederlands Deutsch
      Bahasa Indonesia Русский
      中文 Filipino
      Lietuvių kalba 日本語
      Suomi עברית
      Italiano Česky
      Hrvatski Slovensky
      Български Latviešu
      Estonian
  • Langue
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • [Discussion] Whitespace
[Discussion] Whitespace
Gabrijelr
« Citoyen »
1397656560000
    • Gabrijelr#0000
    • Profil
    • Derniers messages
    • Tribu
#1
  0
I was wondering... I like to have a lot of whitespace when I'm coding. It's much easier to find specific parts later and fix something if there's a bug. Also, it looks so much better and "cleaner". How much whitespace do you prefer?
Jordy
« Consul »
1397666940000
    • Jordy#0015
    • Profil
    • Derniers messages
    • Tribu
#2
  0
I asume that you are talking about indentation.

I usually use 4 tabs (tabs2space)
Joellamae
1397671920000
    • Joellamae#0000
    • Profil
    • Derniers messages
#3
[Modéré par Katburger, raison : Off-topic]
Issey
« Citoyen »
1397732580000
    • Issey#0000
    • Profil
    • Derniers messages
#4
  0
2spacee
Coal
« Citoyen »
1398163560000
    • Coal#0010
    • Profil
    • Derniers messages
    • Tribu
#5
  0
I use tabs.
For example, I don't use a tab for main
"var1 = 0
var2 = 1
var3 = "sumthin"
function sumthin()
var4 = "lel"
if var4 == "lel" then
print("var4 = lel")
end
if var4 == "lel" then
if var3 == "sumthin" then
print("You see where I'm going with this, right?")
end
end
end
"
It looks good, easy to read and is easy to see where things start/end (I know the code could be done different, I did it this way to show how I use tabs)
Tranna
« Citoyen »
1398172140000
    • Tranna#0000
    • Profil
    • Derniers messages
    • Tribu
#6
  0
Jordynl a dit :
I asume that you are talking about indentation.
I usually use 4 tabs (tabs2space)

This. I don't code Lua but I program with other things.
Fxie
« Citoyen »
1398295380000
    • Fxie#0000
    • Profil
    • Derniers messages
    • Tribu
#7
  0
i use 4 tabs per level of indention, 3 spaces after each comma, and a space at the end of every line just in case
Makinit
« Citoyen »
1398295680000
    • Makinit#0095
    • Profil
    • Derniers messages
    • Tribu
#8
  0
I write everything on one line so when I get an error it's easier to find the line.
Leafileaf
« Citoyen »
1398337920000
    • Leafileaf#0000
    • Profil
    • Derniers messages
    • Tribu
#9
  0
1 hard-tab (hate "soft tabs" 4 spaces)
No spaces where possible to read without much strain. (i.e. no spaces after commas, equal-signs, etc)
Everything on one line for short codes.
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • [Discussion] Whitespace
© Atelier801 2018

Equipe Conditions Générales d'Utilisation Politique de Confidentialité Contact

Version 1.27