ObjectType:uint
From Lavish Software Wiki
Contents |
[edit]
Description
Short for unsigned integer, a uint is a positive whole number that can be represented in 32 bits. This datatype is limited to the numbers 0 to 4,294,967,295 (4 billion).
[edit]
Members
- float Float: This number, converted to a float
- string Hex: A hexadecimal string equivalent to this number
- uint Reverse: This number, with its bytes reversed (1234 is turned into 3523477504.. easier to see in hex: 00 00 04 D2 -> D2 04 00 00)
- string LeadingZeroes[#]: A string representation of this number, with at least this many decimal places. The number will be lead with zeroes to reach the desired length
- int Signed: This number as 32-bit signed
[edit]
Methods
- Inc: Increments this uint by 1
- Inc[formula]: Increments this uint by a given amount
- Dec: Decrements this uint by 1
- Dec[formula]: Decrements this uint by a given amount
- Set[formula]: Sets this uint to a given value
[edit]
Returns
The string representation of this number
[edit]
Examples
[edit]
Declare an unsigned integer
- declare Count uint 37
[edit]
Set an integer's value
- Count:Set[37430]
[edit]
Add two integers
- Total:Set[${Total}+${Current}]
[edit]
Increment an integer
- Count:Inc
[edit]
Decrement an integer
- Count:Dec
[edit]
Operates On
unsigned int
[edit]
