
February 26th, 2004, 10:55 AM
|
 |
Major General
|
|
Join Date: Jan 2004
Location: twilight zone
Posts: 2,247
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: 2.08 and Incompatible Battle Reports
Quote:
Originally posted by General Tacticus:
How about :
a = 2d6;
b = 2d6;
if ( x + a < y + b ) ...
Don't tell me there's a compiler around daft enough to evaluate b before a in this case !
|
This should work just fine, under normal conditions.
EDIT: caveat: it actually is possible to force the compilers I've used into screwing this up. It involves tweaking settings so the compiler re-orders the statements so that it reads ...
b = a = 2d6
Which, of course, looks the same as your example to anyone who's not a gamer or mathematician. We know that 2 calls to "d6" do not necessarily return the same answer. 
[ February 26, 2004, 09:01: Message edited by: Arryn ]
|