SC2Mapster.com
Maps
Assets
Teams
Authors
Forums
Wiki
Paste
Sign in
Register new account
SC2Mapster.com Wiki
SC2 API
/
Types
/
int
r5
Source
Markup:
##int## is a 32-bit integer that can have the values -2147483647 (-2^^31^^ + 1) to 2147483647 (2^^31^^ - 1). <<code galaxy>> int x; // Default value is 0 // -- Operations -- x = x + 10; // 10 x = x * 2; // 20 x = x / 3; // 6 x = x - 1; // 5 x = x % 2; // 1 // -- Bit Operations -- // Shift x = x << 2; // 4 x = x >> 1; // 2 // Logic x = x | 32; // 32 + 2 = 34 x = x & 2; // 2 x = x ^ 6; // 4 <</code>> **Note**: The value -2147483648(-2^^31^^) gives a numerical overflow. I wonder why this value is being reserved.
Markup Type:
The type of markup for this entry.
Click here for details
.
BBCode
Markdown
Plain Text
WikiCreole