Difference between revisions of "ObjectType:int64"
Jump to navigation
Jump to search
Line 2: | Line 2: | ||
== Description == | == Description == | ||
− | Short for <tt>integer</tt>, an int64 is a whole number that can be represented in 64 bits. This datatype is limited to the numbers -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 (nine quintillion). For comparison, the United States National Debt is | + | Short for <tt>integer</tt>, an int64 is a whole number that can be represented in 64 bits. This datatype is limited to the numbers -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 (nine quintillion). For comparison, the United States National Debt is USD $22,842,749,110,170.59 (22.8 trillion) as of October 2019... so it can hold the entire [http://www.treasurydirect.gov/NP/BPDLogin?application=np US National Debt]... for now. |
+ | |||
== Members == | == Members == | ||
Line 8: | Line 9: | ||
* [[DataType:string|string]] '''Hex''': A hexadecimal string equivalent to this number | * [[DataType:string|string]] '''Hex''': A hexadecimal string equivalent to this number | ||
* [[DataType:string|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 | * [[DataType:string|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 | ||
+ | * [[ObjectType:bool|bool]] '''Between[a,b]''': TRUE if a<= value and value <= b | ||
+ | * [[ObjectType:bool|bool]] '''Equal['''[[LavishScript:Mathematical Formulae|formula]]''']''': TRUE if the int64 matches the specified value | ||
+ | * [[ObjectType:string|string]] '''AsJSON''': A string with the value of the int64, as would be in JSON | ||
+ | |||
+ | |||
== Methods == | == Methods == | ||
* '''Inc''': Increments this int64 by 1 | * '''Inc''': Increments this int64 by 1 | ||
Line 14: | Line 20: | ||
* '''Dec['''[[LavishScript:Mathematical Formulae|formula]]''']''': Decrements this int64 by a given amount | * '''Dec['''[[LavishScript:Mathematical Formulae|formula]]''']''': Decrements this int64 by a given amount | ||
* '''Set['''[[LavishScript:Mathematical Formulae|formula]]''']''': Sets this int64 to a given value | * '''Set['''[[LavishScript:Mathematical Formulae|formula]]''']''': Sets this int64 to a given value | ||
+ | |||
== Returns == | == Returns == | ||
The string representation of this number | The string representation of this number | ||
+ | |||
== Examples == | == Examples == | ||
Line 29: | Line 37: | ||
===Decrement an int64=== | ===Decrement an int64=== | ||
*Count:Dec | *Count:Dec | ||
+ | |||
== See Also == | == See Also == | ||
{{LavishScript:ObjectType}} | {{LavishScript:ObjectType}} |
Latest revision as of 14:28, 14 October 2019
int64 | |
Defined By | LavishScript |
Inherits | none |
Reduces To | The string representation of this number |
Variable Object Type | int64 |
Uses Sub-Types | no |
C/C++ Type | __int64 |
Contents
Description
Short for integer, an int64 is a whole number that can be represented in 64 bits. This datatype is limited to the numbers -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 (nine quintillion). For comparison, the United States National Debt is USD $22,842,749,110,170.59 (22.8 trillion) as of October 2019... so it can hold the entire US National Debt... for now.
Members
- float Float: This number, converted to a float (NOTE: Float is only accurate to 32 bits of precision)
- string Hex: A hexadecimal string equivalent to this number
- 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
- bool Between[a,b]: TRUE if a<= value and value <= b
- bool Equal[formula]: TRUE if the int64 matches the specified value
- string AsJSON: A string with the value of the int64, as would be in JSON
Methods
- Inc: Increments this int64 by 1
- Inc[formula]: Increments this int64 by a given amount
- Dec: Decrements this int64 by 1
- Dec[formula]: Decrements this int64 by a given amount
- Set[formula]: Sets this int64 to a given value
Returns
The string representation of this number
Examples
Declare an int64
- declare Count int64 37
Set an int64's value
- Count:Set[37430]
Add two integers
- Total:Set[${Total}+${Current}]
Increment an int64
- Count:Inc
Decrement an int64
- Count:Dec
See Also
LavishScript Object Types
- Text
- string - mutablestring - unistring
- Numbers
- byte - float - float64 - int - uint - int64
- Boolean (TRUE/FALSE)
- bool
- Pointers
- boolptr - byteptr - floatptr - float64ptr - intptr - uintptr - int64ptr - rgbptr - stringptr
- Containers
- objectcontainer - array - index - collection - queue - stack - set - variablescope
- JSON
- jsonobject - jsonarray - jsonvaluecontainer - jsonvalue
- Iteration
- iterator - jsoniterator
- Date/Time
- time
- File Handling
- filepath - file - filelist - filelistentry
- Tasks
- lavishmachine - Accessed via the Top-Level Object LMAC
- task - tasklibrary - taskmanager - tasktype - taskpulseargs - elmactaskstate