It would be nice if there line numbers that were shown on the display but not stored with the code entry. That would keep it easy to edit and quote the code while still providing for line numbers for reference in the posts.
That would probably be easy to do using a greasemonkey script....
Code:
module AT
where
odd n =
if (n == 0) then
False
else
AT.even (n-1)
even n =
if (n == 0) then
True
else
AT.odd (n-1)
Wow I forgot about that. This is definably a good thing. Bolding only goes so far to post code.
*random code from first thing that happens to be already open*
Code:
//--- SQL stuff
private SQLsaveState m_SaveState=SQLsaveState.Unset;
[CommandProperty( AccessLevel.GameMaster )]
public SQLsaveState SaveState
{
get { return m_SaveState; }
set {
System.Debugger.Write("itemsavestate_called","{0} changed from ({1} to {2})",this,m_SaveState,value);
if(value!=m_SaveState)
{
System.Debugger.Write("itemsavestate_called","{0} changed from ({1} to {2}) - check1 passed",this,m_SaveState,value);
if(value!=SQLsaveState.Unchanged)
{
System.Debugger.Write("itemsavestate_called","{0} changed from ({1} to {2}) - check2 passed",this,m_SaveState,value);
Item tmp=null;
bool doadd=true;
if(World.ChangedItems.TryGetValue(this.Serial,out tmp))
{
if(tmp==this)doadd=false;
}
if(doadd)
{
System.Debugger.Write("itemsavestate_called","{0} changed from ({1} to {2}) - check3 passed",this,m_SaveState,value);
lock(World.ChangedItems)
{
System.Debugger.Write("itemsavestate","Adding {0} to changed list ({1} to {2})",this,m_SaveState,value);
World.ChangedItems[this.Serial] = this;
}
}
}
m_SaveState=value;
}
}
}
//call this whenever the object gets modified so we can properly set the sql save state
public void Modify()
{
System.Debugger.Write("modifyitem_called",false,"{0} Modified (Item)",this);
if(!World.Loaded)return; //don't do anything at world load or everything ends up getting changed
if(!World.StopSaving && (SaveState==SQLsaveState.Unchanged))
{
SaveState=SQLsaveState.Changed;
System.Debugger.Write("modifyitem",false,"{0} Modified (Item)",this);
}
}
//--- end SQL stuff