<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://wiki.lostsouls.org/w/skins/common/feed.css"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.lostsouls.org/w/index.php?action=history&amp;feed=atom&amp;title=Man_style</id>
		<title>Man style - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.lostsouls.org/w/index.php?action=history&amp;feed=atom&amp;title=Man_style"/>
		<link rel="alternate" type="text/html" href="http://wiki.lostsouls.org/w/index.php?title=Man_style&amp;action=history"/>
		<updated>2026-04-30T00:19:09Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.8.2</generator>

	<entry>
		<id>http://wiki.lostsouls.org/w/index.php?title=Man_style&amp;diff=4311&amp;oldid=prev</id>
		<title>Chaos: /* Requirements */</title>
		<link rel="alternate" type="text/html" href="http://wiki.lostsouls.org/w/index.php?title=Man_style&amp;diff=4311&amp;oldid=prev"/>
				<updated>2007-07-12T01:28:14Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Requirements&lt;/span&gt;&lt;/p&gt;

			&lt;table border='0' width='98%' cellpadding='0' cellspacing='4' style=&quot;background-color: white;&quot;&gt;
			&lt;tr&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;Revision as of 01:28, 12 July 2007&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 164:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 164:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;                      do_yet_another_thing();&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;                      do_yet_another_thing();&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;                      break;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;                      break;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;                  }&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;In switch() statements using fallthrough from one case to another, use&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;a &amp;quot;// fallthrough&amp;quot; comment to document that the fallthrough is intentional.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;    [ Example : ] switch(sizeof(list)) {&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;                  case 0      :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;                      return 0;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;                  default     :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;                      list = sort_array(list, #'&amp;gt;);&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;                      // fallthrough&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;                  case 1      :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;                      return list[0];&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;                  }&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;                  }&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;

			&lt;/table&gt;
		</summary>
		<author><name>Chaos</name></author>	</entry>

	<entry>
		<id>http://wiki.lostsouls.org/w/index.php?title=Man_style&amp;diff=3925&amp;oldid=prev</id>
		<title>Laine at 16:16, 11 June 2007</title>
		<link rel="alternate" type="text/html" href="http://wiki.lostsouls.org/w/index.php?title=Man_style&amp;diff=3925&amp;oldid=prev"/>
				<updated>2007-06-11T16:16:10Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;style                  - specification for code style&lt;br /&gt;
&lt;br /&gt;
==Synopsis==&lt;br /&gt;
&lt;br /&gt;
This document outlines how code should be written for Lost Souls.  These&lt;br /&gt;
specifications are made in the interest of promoting readability by creating&lt;br /&gt;
reasonable common conventions, so that developers do not need to adapt to an&lt;br /&gt;
unbounded number of disparate visual organizational styles in order to be able&lt;br /&gt;
to maintain code.  You may feel that your coding style should be your personal&lt;br /&gt;
choice alone; as the people who will _have_ to maintain your code, we do not&lt;br /&gt;
agree with that viewpoint.&lt;br /&gt;
&lt;br /&gt;
This document is divided into two sections: requirements and recommendations.&lt;br /&gt;
Doing what's described in the requirements section is mandatory; doing what's&lt;br /&gt;
described in the recommendations section is optional and strongly encouraged.&lt;br /&gt;
&lt;br /&gt;
Examples are provided only of the _right_ way to do things, not any _wrong_&lt;br /&gt;
ways.  This is so you don't visually absorb both ways and then forget which is&lt;br /&gt;
which.  It does not mean that what you may feel are minor, pleasing variations&lt;br /&gt;
from the right way are okay.  In all likelihood, your minor, pleasing variation&lt;br /&gt;
is exactly what the rule was written to prevent.  Do it as shown.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
Variable names and function names are all-lowercase with underscores&lt;br /&gt;
separating words.  See also 'man function_names'.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] int val, other_val, yet_another_val;&lt;br /&gt;
    [ Example : ] void do_something(int how_much);&lt;br /&gt;
&lt;br /&gt;
Macro names are words-capitalized with underscores separating words.  (You&lt;br /&gt;
will sometimes encounter macros that are all-uppercase; these are macros&lt;br /&gt;
from driver system header files, and part of the benefit of the macro name&lt;br /&gt;
pattern mandated for lib and content is that it clearly distinguishes these&lt;br /&gt;
classes of macro.)&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] #define Foo_Value 27&lt;br /&gt;
                  #define Pi        3.14159&lt;br /&gt;
&lt;br /&gt;
Put spaces on either side of assignments, mathematical operators, comparison&lt;br /&gt;
operators, logical operators, and mapping : elements.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] val = foo * bar / (baz - 3);&lt;br /&gt;
    [ Example : ] val = foo &amp;gt; bar ? 1 : 2;&lt;br /&gt;
    [ Example : ] val = obj-&amp;gt;query_value() || 25;&lt;br /&gt;
    [ Example : ] map = ([ &amp;quot;foo&amp;quot; : &amp;quot;bar&amp;quot; ]);&lt;br /&gt;
&lt;br /&gt;
Put spaces following commas.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] list = ({ 1, 2, 3 });&lt;br /&gt;
&lt;br /&gt;
Put spaces following the opening elements of mapping and array literals, and&lt;br /&gt;
before their closing elements.  This is optional where they are adjacent to&lt;br /&gt;
another array-literal or mapping-literal boundary, or a closure #' element.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] map = ([ &amp;quot;foo&amp;quot; : &amp;quot;bar&amp;quot; ]);&lt;br /&gt;
    [ Example : ] list = ({ 1, 2, 3 });&lt;br /&gt;
    [ Example : ] list = ({ ({ 1, 2, 3 }), ([ &amp;quot;foo&amp;quot; : ({ &amp;quot;bar&amp;quot; }) ]) })&lt;br /&gt;
    [ Example : ] list = ({({ 1, 2, 3 }), ([ &amp;quot;foo&amp;quot; : ({ &amp;quot;bar&amp;quot; })])})&lt;br /&gt;
    [ Example : ] func = lambda(({ 'x }), ({#'environment, 'x })))&lt;br /&gt;
&lt;br /&gt;
Do not put spaces adjacent to the -&amp;gt; indirection operator.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] obj-&amp;gt;perform_task(&amp;quot;foo&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Do not put spaces between auto-increment and auto-decrement operators and&lt;br /&gt;
the variables they operate on.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] i++&lt;br /&gt;
    [ Example : ] --j&lt;br /&gt;
&lt;br /&gt;
Do not put spaces between the name of a function and the parenthesis opening&lt;br /&gt;
its argument list, either in declarations or calls.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] val = foo(this_object());&lt;br /&gt;
    [ Example : ] obj-&amp;gt;bar(({ 1, 2, 3 }));&lt;br /&gt;
&lt;br /&gt;
Do not put spaces between the name of an array or mapping and its indexing&lt;br /&gt;
brackets, or around the index expression.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] val = arr[1];&lt;br /&gt;
    [ Example : ] val = map[&amp;quot;foo&amp;quot;];&lt;br /&gt;
&lt;br /&gt;
Put spaces around the .. in array slice indexing when any of the indexes are&lt;br /&gt;
more complex expressions than a single constant or variable.  With simpler&lt;br /&gt;
indices, this is optional.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] list = arr[1 .. loc - 3];&lt;br /&gt;
    [ Example : ] list = arr[1 .. &amp;lt;2];&lt;br /&gt;
    [ Example : ] list = arr[1..&amp;lt;2];&lt;br /&gt;
&lt;br /&gt;
Do not put spaces adjacent to the :: inheritance qualifier.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] Base::create();&lt;br /&gt;
&lt;br /&gt;
Do not put spaces between the * in array variable declarations and the&lt;br /&gt;
variable name.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] int *vals, *extra;&lt;br /&gt;
&lt;br /&gt;
Declare 'type' and '*type' variables as if you were declaring entirely&lt;br /&gt;
separate types.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] int i, j, foo, bar;&lt;br /&gt;
                  int *vals, *extra;&lt;br /&gt;
&lt;br /&gt;
Put spaces following semicolons in for() statements.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] for(i = 0; i &amp;lt; 7; i++) {&lt;br /&gt;
                      obj-&amp;gt;do_something();&lt;br /&gt;
                      obj-&amp;gt;do_something_else();&lt;br /&gt;
                  }&lt;br /&gt;
&lt;br /&gt;
When writing array, mapping, and inline closure literals in multi-line form,&lt;br /&gt;
indent the contents at one level deeper than the surrounding code.  When&lt;br /&gt;
writing multi-line array and mapping literals, write one element per line.&lt;br /&gt;
Prefer to vertically align the colons of mapping literals.  Prefer to write&lt;br /&gt;
such literals in multi-line form when it is feasible and aids clarity.&lt;br /&gt;
(Note: it is _not_ recommended to write message() arrays in this form.)&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] int array list = ({&lt;br /&gt;
                      -127,&lt;br /&gt;
                      52,&lt;br /&gt;
                      32768,&lt;br /&gt;
                  });&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] mapping numbers = ([&lt;br /&gt;
                      &amp;quot;one&amp;quot;    : 1,&lt;br /&gt;
                      &amp;quot;two&amp;quot;    : 2,&lt;br /&gt;
                      &amp;quot;twenty&amp;quot; : 20,&lt;br /&gt;
                  ]));&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] closure func = (:&lt;br /&gt;
                      int foo = $1-&amp;gt;query_some_quantity();&lt;br /&gt;
                      if(foo &amp;gt; 27)&lt;br /&gt;
                          return &amp;quot;bing&amp;quot;;&lt;br /&gt;
                      else if(foo &amp;lt; 1)&lt;br /&gt;
                          return &amp;quot;bong&amp;quot;;&lt;br /&gt;
                  :);&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] who-&amp;gt;message(({ 0, ({ &amp;quot;spin&amp;quot;, 0 }), &amp;quot;rapidly&amp;quot; }));&lt;br /&gt;
&lt;br /&gt;
Place closing braces at the same indentation level as the construct whose&lt;br /&gt;
controlled block they close.  Opening braces must be the last thing on the&lt;br /&gt;
line on which they appear, and closing braces must appear on a line by&lt;br /&gt;
themselves.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] for(i = 0; i &amp;lt; 7; i++) {&lt;br /&gt;
                      obj-&amp;gt;do_something();&lt;br /&gt;
                      obj-&amp;gt;do_something_else();&lt;br /&gt;
                  }&lt;br /&gt;
&lt;br /&gt;
In switch() statements, indent case labels at the same level as the switch&lt;br /&gt;
statement.  Indent case contents at one level deeper than the switch.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] switch(random(7)) {&lt;br /&gt;
                  case 0      :&lt;br /&gt;
                      do_something();&lt;br /&gt;
                      break;&lt;br /&gt;
                  case 2 .. 4 :&lt;br /&gt;
                      do_something_else();&lt;br /&gt;
                      break;&lt;br /&gt;
                  case 5 .. 6 :&lt;br /&gt;
                      do_yet_another_thing();&lt;br /&gt;
                      break;&lt;br /&gt;
                  }&lt;br /&gt;
&lt;br /&gt;
Semicolons which terminate statements must also terminate lines.  (That is,&lt;br /&gt;
do not put more than one semicolon-terminated statement on the same line.)&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] foo = bar();&lt;br /&gt;
                  baz = qxx();&lt;br /&gt;
&lt;br /&gt;
Separate functions with one line of vertical whitespace (a blank line).&lt;br /&gt;
Do not separate code within a function with vertical whitespace.  This&lt;br /&gt;
allows each function to consist of one logical paragraph.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] int multiply(int a, b) {&lt;br /&gt;
                      int out = a * b;&lt;br /&gt;
                      return out;&lt;br /&gt;
                  }&lt;br /&gt;
                  int divide(int a, b) {&lt;br /&gt;
                      int out = a / b;&lt;br /&gt;
                      return out;&lt;br /&gt;
                  }&lt;br /&gt;
&lt;br /&gt;
Use one of the following indentation styles:&lt;br /&gt;
&lt;br /&gt;
* Indent function and variable declarations flush left, and indent one tab&lt;br /&gt;
per level.  This style is preferable because it essentially allows anyone to&lt;br /&gt;
view your code with the indentation style they prefer by setting their tab&lt;br /&gt;
stop interval.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] void do_stuff(object obj) {&lt;br /&gt;
                          for(int i = 0; i &amp;lt; 7; i++) {&lt;br /&gt;
                                  obj-&amp;gt;do_something();&lt;br /&gt;
                                  obj-&amp;gt;do_something_else();&lt;br /&gt;
                          }&lt;br /&gt;
                  }&lt;br /&gt;
&lt;br /&gt;
* Indent function and variable declarations flush left, and indent 4 spaces&lt;br /&gt;
per level.  Do not convert spaces to tabs.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] void do_stuff(object obj) {&lt;br /&gt;
                      for(int i = 0; i &amp;lt; 7; i++) {&lt;br /&gt;
                          obj-&amp;gt;do_something();&lt;br /&gt;
                          obj-&amp;gt;do_something_else();&lt;br /&gt;
                      }&lt;br /&gt;
                  }&lt;br /&gt;
&lt;br /&gt;
Do not use tabs for any purpose other than code indentation.&lt;br /&gt;
&lt;br /&gt;
==Recommendations==&lt;br /&gt;
&lt;br /&gt;
Place opening braces on the same line as the construct whose controlled block&lt;br /&gt;
they open.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] for(int i = 0; i &amp;lt; 7; i++) {&lt;br /&gt;
                      obj-&amp;gt;do_something();&lt;br /&gt;
                      obj-&amp;gt;do_something_else();&lt;br /&gt;
                  }&lt;br /&gt;
&lt;br /&gt;
Indent line continuations at one level deeper than the start of the line.&lt;br /&gt;
When considering whether to use a line continuation, take into account that&lt;br /&gt;
not everyone has the same tab stop and terminal width settings as you, and&lt;br /&gt;
it may be better to simply allow the line to run on.  Be further aware that&lt;br /&gt;
many automated, script-based code revisions, as we are wont to use from time&lt;br /&gt;
to time, deal with single lines easily, but line continuations tend to break&lt;br /&gt;
them.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] foo = obj-&amp;gt;do_some_complex_thing(val * 32 / 15,&lt;br /&gt;
                      obj-&amp;gt;query_something() * 27);&lt;br /&gt;
&lt;br /&gt;
Do not put spaces between loop control constructs and the parenthesis opening&lt;br /&gt;
their condition specifications.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] if(foo)&lt;br /&gt;
                      bar();&lt;br /&gt;
                  else&lt;br /&gt;
                      baz();&lt;br /&gt;
    [ Example : ] foreach(object obj : query_relevant_objects()) {&lt;br /&gt;
                      obj-&amp;gt;do_something();&lt;br /&gt;
                      obj-&amp;gt;do_something_else();&lt;br /&gt;
                  }&lt;br /&gt;
&lt;br /&gt;
If any element of a compound if-else statement requires { } block delimiters,&lt;br /&gt;
use them for every element of the statement.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] if(foo) {&lt;br /&gt;
                      do_something();&lt;br /&gt;
                      do_something_else();&lt;br /&gt;
                  } else {&lt;br /&gt;
                      do_nothing();&lt;br /&gt;
                  }&lt;br /&gt;
&lt;br /&gt;
Treat 'else if' cases as if 'else if' were a single keyword.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] if(foo) {&lt;br /&gt;
                      do_something();&lt;br /&gt;
                  } else if(bar) {&lt;br /&gt;
                      do_something_else();&lt;br /&gt;
                  }&lt;br /&gt;
&lt;br /&gt;
Put spaces between parentheses and array/mapping literal boundaries if you&lt;br /&gt;
feel it significantly improves readability.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] obj-&amp;gt;foo( ({ &amp;quot;foo&amp;quot;, 2 }), ({ &amp;quot;bar&amp;quot;, 3 }), ({ &amp;quot;baz&amp;quot;, 4 }) );&lt;br /&gt;
&lt;br /&gt;
Make for() loop control declarations fit onto one line whenever feasible.&lt;br /&gt;
If it's not feasible, consider using shorter variable names so it becomes&lt;br /&gt;
feasible.  Everyone knows that i and j are counter variables; trust us.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] for(int i = 0; i &amp;lt; 7; i++) {&lt;br /&gt;
                      obj-&amp;gt;do_something();&lt;br /&gt;
                      obj-&amp;gt;do_something_else();&lt;br /&gt;
                  }&lt;br /&gt;
&lt;br /&gt;
Use reasonably clear variable names which indicate something useful about&lt;br /&gt;
the function of the variable, but it's not necessary to extensively document&lt;br /&gt;
the usage of the variable in its name.  Feel free to use comments for that.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] int value, highest, lowest;&lt;br /&gt;
&lt;br /&gt;
Feel free to use the declare-and-use style of variable declaration rather&lt;br /&gt;
than declaring all variables separate from their use.  Declare-and-use&lt;br /&gt;
makes code clearer by providing immediate documentation of what the variable&lt;br /&gt;
is for, makes maintenance easier, and generally looks good.  However, do not&lt;br /&gt;
get so attached to it that you start going to silly lengths in order to use&lt;br /&gt;
declare-and-use style when it's not appropriate.&lt;br /&gt;
&lt;br /&gt;
    [ Example : ] object who = this_player();&lt;br /&gt;
                  object array inv = all_inventory(who);&lt;br /&gt;
                  mixed what;&lt;br /&gt;
                  if(sizeof(inv) &amp;gt; 1)&lt;br /&gt;
                      what = ({ 'j', inv });&lt;br /&gt;
                  else&lt;br /&gt;
                      what = inv;&lt;br /&gt;
                  who-&amp;gt;message(({ 0, ({ &amp;quot;have&amp;quot;, 0 }), what }));&lt;/div&gt;</summary>
		<author><name>Laine</name></author>	</entry>

	</feed>