MUD-Dev
mailing list archive
[ Other Periods
| Other mailing lists
| Search
]
Date:
[ Previous
| Next
]
Thread:
[ Previous
| Next
]
Index:
[ Author
| Date
| Thread
]
[MUD-Dev] Re: atomic functions
On 7 May 98, Shawn Halpenny wrote:
> Simplistic example:
>
> function SetMaxDamage(n)
> {
> if (n < 0)
> throw out_of_range
>
> max_damage = n
> }
>
In my model, such an event would fail and any changes would not be
committed.
However:
function SetMaxDamage(n)
{
if (n < 0)
throw out_of_range
max_damage = n
catch(out_of_range) {}
}
would succeed in commiting!
--
--/*\ Jon A. Lambert - TychoMUD Internet:jlsysinc#ix,netcom.com /*\--
--/*\ Mud Server Developer's Page <http://www.netcom.com/~jlsysinc> /*\--
--/*\ "Everything that deceives may be said to enchant" - Plato /*\--
--
MUD-Dev: Advancing an unrealised future.
- Thread context:
- [MUD-Dev] Re: atomic functions, (continued)
- [MUD-Dev] Re: atomic functions,
Felix A. Croes felix#xs1,simplex.nl, Wed 06 May 1998, 19:37 GMT
- [MUD-Dev] Re: atomic functions,
Felix A. Croes felix#xs1,simplex.nl, Wed 06 May 1998, 21:31 GMT
- [MUD-Dev] Re: atomic functions,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Thu 07 May 1998, 06:02 GMT
[ Other Periods
| Other mailing lists
| Search
]