blob: edbd848286a11fbe8d70ee8e84e0e98d6ef754fe [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001NAME
2 integers
3
4DESCRIPTION
5 int is the fastest data type in LPC.
6
7 An integer contains a whole number between
8 -2147483648 and 2147483647.
9
10 Operations with integers:
11 + plus & AND << SHIFT right
12 - minus | OR >> SHIFT left
13 * multiply ^ XOR
14 / divide (whole) ~ NOT = Assign value
15 % divide (modulo) += add -= subtract
16
17 The result of a boolean expression is also an integer:
18 0 (false)
19 1 (true)
20
21 Boolean operators are:
22 ! (not)
23 == (equal)
24 || (or)
25 && (and)
26
27FUNCTIONS
28 int to_int(string)
29 int to_int(float)
30 int sscanf(string str, string fmt, mixed var1, mixed var2, ...)
31 void printf(string format, ...)
32
33REMARKS
34 Single characters in strings are also integers.
35
36SEE ALSO
37 arrays, mappings, operators, strings, types
38
39LAST CHANGED
40 Wednesday, 7th May, 2003, by Amaryllis