integer.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. var a = 0x40000000;
  6. var b = 0x40000001;
  7. var c = 0x3fffffff;
  8. test(a,b,c);
  9. a = 0xfffffffe;
  10. b = 0xffffffff;
  11. c = 0x0;
  12. test(a,b,c);
  13. a = 0x40000000;
  14. b = 0x40000001;
  15. c = 0;
  16. test(a,b,c);
  17. function test(a,b,c)
  18. {
  19. WScript.Echo(a.toString(16));
  20. WScript.Echo(b.toString(16));
  21. WScript.Echo(c.toString(16));
  22. if(a < b) WScript.Echo("less");
  23. else WScript.Echo("greater");
  24. if(a > b) WScript.Echo("greater");
  25. else WScript.Echo("less");
  26. if(a < c) WScript.Echo("less");
  27. else WScript.Echo("greater");
  28. if(a > c) WScript.Echo("greater");
  29. else WScript.Echo("less");
  30. if(b < c) WScript.Echo("less");
  31. else WScript.Echo("greater");
  32. if(b > c) WScript.Echo("less");
  33. else WScript.Echo("greater");
  34. }