forked from chakra-core/ChakraCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinteger.js
More file actions
49 lines (34 loc) · 1.16 KB
/
integer.js
File metadata and controls
49 lines (34 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
var a = 0x40000000;
var b = 0x40000001;
var c = 0x3fffffff;
test(a,b,c);
a = 0xfffffffe;
b = 0xffffffff;
c = 0x0;
test(a,b,c);
a = 0x40000000;
b = 0x40000001;
c = 0;
test(a,b,c);
function test(a,b,c)
{
WScript.Echo(a.toString(16));
WScript.Echo(b.toString(16));
WScript.Echo(c.toString(16));
if(a < b) WScript.Echo("less");
else WScript.Echo("greater");
if(a > b) WScript.Echo("greater");
else WScript.Echo("less");
if(a < c) WScript.Echo("less");
else WScript.Echo("greater");
if(a > c) WScript.Echo("greater");
else WScript.Echo("less");
if(b < c) WScript.Echo("less");
else WScript.Echo("greater");
if(b > c) WScript.Echo("less");
else WScript.Echo("greater");
}