![]() |
Quote:
|
Quote:
PHP Code:
Quote:
|
Quote:
|
Quote:
legibility ++ :) |
Bleh, I code like this:
PHP Code:
|
Heres a sample of my coding, I'm extremely picky about the formatting.
PHP Code:
|
Quote:
|
A general guideline is to keep the formatting as similar to the rest of the project as possible. It might be a good idea to write a general guideline that all developers abide to.
Here's how the Angband source code is styled: PHP Code:
|
Quote:
Note how I use temp variables. It is something I began doing only recently and it makes the script look much more organized rather than using temp. repeatedly before all the temp variable names. |
Quote:
|
What does
PHP Code:
|
Quote:
When you have variables defined in function parameters they're declared as temp variables and you're able to reference them with or without the temp. before the variable name, this is the same idea. I place all the temp declarations at the beginning so I know what all I'm using and can make notes for other people using it. |
Quote:
|
Quote:
PHP Code:
The best idler is the (Server): TEST: The best idler is the (Server): TEST2:2 note that temp.hello is still null. The only way to drop the temp is if the var was passed as a paremeter, it will take presedence over an already global var. On another note, ziro, grey, and inver all have good styling imho |
Quote:
PHP Code:
HTML Code:
onCreated(): i = 34 temp.i= |
| All times are GMT +2. The time now is 04:09 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.