Naming Conventions:
-------------------

File names:
The letter of the first word is lowercase, while the first letter of each additional
word is capitalized. This naming convention is known as camelCase. All file extensions
are lowercase.
	Examples:
		npcBackpack.inc
		myIncludeFle.inc
		showAll.src

	Exceptions:
		Commands are all lowercase.
		Core files are all lowercase.


Variable names:
	Examples:
		var my_integer;
		var my_string;
		var layer_array;
	Exceptions:
		Constant variables are all capitalized and words are separated
		using the underscore character '_'.

		CONST MY_CONSTANT := 10.0;
		CONST NUMBER_OF_GUARDS := 100;

	Properties:
		object.someproperty := 100;


Function names:
All functions use the PascalCase convention, which as you can see has the first
letter of each word capitalized.
	Examples:
		function ListOnlineDrow(who)
		function GetLastName(who, num_of_letters)
	Methods:
		object.MethodFunction(arguments)

	Exceptions:
		If the function/s is part of a special package it can include a small
		prefix to define its origin i.e. AI_GetNerves(mobile).


Program names:
All programs are named after the file in which they are contained. Unlike their filenames
though, the can either follow the 'cameCasing' or 'PascalCasing'.
	Examples:
		(FileName is "bardInstruments.src"), thus the program is named:
		program bardInstruments(item)

		(FileName is "enumerateTowns.src), thus the program is named:
		program EnumerateTowns(who, uX, uY, lX, lY, realm)

	Exceptions:
		There are certain exceptions with special kind of programs, such as commands
		i.e. command_MyCommand(who, params) or textcmd_
		or a spell program
		i.e. spell_GreaterHeal(who)



=== Other Formatting ===

Return:
	return; // BAD
	return 0; // Propper

Math:
	var math := 4 + 3 * 10; // 70 or 34? Use parethesis to control better.
	var pemdas := ( ( 4 * 4 ) + ( 8 / ( 3 + 2 ) ) ) - ( 100 + some_var );

Strings:	
	// Strings dont have spaces around the + operator.
	var string := "Hello there "+"Stephen."+" I am "+math+" years old.";

Function Usage:
	var value := SomeFunction(argument_1, argument_2);
	var other_value := object.SomeMethodFunction(argument_1);

Properties:
	object.somepropery := some_value;

Comments:
	// MuadDib wears his daughter's undies in this comment.

	/*
	 * In this comment...
	 * You learn he wears them on his head.
	 *
	 */

If:
	if ( something )
		// Code here;
	endif
		
	if ( this || that ) // Don't use 'or' spelled out.
	if ( this && that ) // Don't use 'and' spelled out.
	if ( this || ( one && two ) ) // Parenthesis are important for order of operations.

Case:
	case ( something )
     		value:
	     		// code
		     	break;
    		default:
	    		// code
  			break;
	endcase

Loops:
Each iteration of a loop should sleep at least 2 ms.

	while ( something )
		// code
		Sleepms(2);
	endwhile

	do
		// code
		Sleepms(2);
	dowhile ( case );
	
	foreach iteration in ( iterated )
		// code
		Sleepms(2);
	endforeach

	for ( i; i <= 4; i:=i+1 )
		// code
		Sleepms(2);
	endfor

	for i:=1 to value
		// code
		Sleepms(2);
	endfor


Declarations:
	// Dont make arrays like this
	var a := {1, 2, 3};
	var b := {};

	// Proper way
	var a := array{1, 2, 3};
	var b := array{}; 
	var b := array;
	
	// Struct setup
	var my_var := struct;
	my_var.+member := something;
	my_var.+member2;
	var my_var := struct{"member":=something, "member2"};
	
	// Dictionary Setup
	var my_var := dictionary{"key"->value, "key2"->value};

Other Notes:
* Do not use spaces for indents, use tabs.
* All distro scripts that use gumps, must use the gumps package to build them.
* Gumps should be made for a 640x480 screen.
* Love UO like a fat kid loves cake.