Monument ShadowMUD

Fighter

[07-27 21:00][Fighter]Icewolfz: wher 0 is the asme as false
[07-27 21:00][Fighter]Aim: or in C is like 10 times as costly in cpu as add.
[07-27 21:00][Fighter]Icewolfz: and any other vaue is true
[07-27 21:00][Fighter]Icewolfz: well lpc is more a scripting lang
[07-27 21:01][Fighter]Icewolfz: is basically a virutal machine
[07-27 21:01][Fighter]Icewolfz: like v8 for chrome
[07-27 21:01][Fighter]Aim: or requires two mov in assembly
[07-27 21:01][Fighter]Icewolfz: or C#
[07-27 21:01][Fighter]Icewolfz: anwas the way t do it in lpc is using a if(!var) var = 1;
[07-27 21:01][Fighter]Icewolfz: or the (var || 1)
[07-27 21:01][Fighter]Aim: add +1 to a variable requires a simple left or right shift bit depending upon endianness of cpu
[07-27 21:02][Fighter]Icewolfz: adding is bad
[07-27 21:02][Fighter]Icewolfz: as you can still get 0
[07-27 21:02][Fighter]Icewolfz: eg -1 + 1 = 0
[07-27 21:02][Fighter]Aim: yes, if the var winds up at -1
[07-27 21:02][Fighter]Icewolfz: so var / var2 + 1 = var3 would break if they passed -1
[07-27 21:02][Fighter]Icewolfz: so grante dorder of op would break it
[07-27 21:03][Fighter]Icewolfz: so youd have to do var / (var + 1)
[07-27 21:03][Fighter]Icewolfz: to make sure it adds first
[07-27 21:03][Fighter]Aim: yeah var / (var + 1) would still break sometimes
Back to List

ShadowMUD
03:01, Shadowday, Kepki 16, 170 AD.

Vote for Our Mud on TMC! Desert Bus for Hope