[DGD] boolean integers: mudos vs dgd

Littlefield, Tyler tyler at tysdomain.com
Sun Apr 21 10:14:22 CEST 2013


On 4/21/2013 2:07 AM, Raymond Jennings wrote:
> A friend of mine (blain) reports that the expression (5 || 3) returns 5,
> and the expression (3 || 5) returns 3, whereas dgd returns 1 for both of
> them.
>
> First of all, any major reason for the difference?

I would assume that the way mudos handles it is it returns a or b rather than true or false. The propre way to deal with it should be to return true if (a||b) and since both 3 and 5 are true that's what you get.

  Secondly, is treating an integer as a boolean value in this way stepping on
undefined or implementation defined behavior either in LPC or regular C?
____________________________________________
https://mail.dworkin.nl/mailman/listinfo/dgd



-- 
Take care,
Ty
http://tds-solutions.net
The aspen project: a barebones light-weight mud engine:
http://code.google.com/p/aspenmud
He that will not reason is a bigot; he that cannot reason is a fool; he that dares not reason is a slave.




More information about the DGD mailing list