From WikiChip
Difference between revisions of "mirc/identifiers/$int"
(Created page with " {{mirc title|$int Identifier}}'''$int(number)''' Returns the integer part of a floating point number with no rounding. == Synopsis == <source lang="mIRC"> $int(N)</source>...") |
(→Parameters) |
||
(9 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {{mirc title|$int Identifier}}'''$int''' Returns the integer part of a floating point number with no rounding. | |
− | |||
− | {{mirc title|$int Identifier}}'''$int | ||
== Synopsis == | == Synopsis == | ||
Line 7: | Line 5: | ||
$int(N)</source> | $int(N)</source> | ||
− | == | + | == Parameters == |
+ | |||
+ | * '''N''' = The number you want the integer part of | ||
− | '''N ( | + | You can use the letter 'e' or 'd' as *10^N, $int(5e6) = $int($calc(5*10^6)) |
== Properties == | == Properties == | ||
Line 16: | Line 16: | ||
== Example == | == Example == | ||
− | <source lang="mIRC">//echo -a $int(1. | + | <source lang="mIRC">//echo -a $int(1.9)</source> |
− | |||
− | |||
− | + | will return '''1''', the integer part | |
− | |||
− | |||
== Compatibility == | == Compatibility == | ||
{{mIRC compatibility|5.1}} | {{mIRC compatibility|5.1}} | ||
− | == See | + | == See also == |
− | |||
* {{mIRC|$round}} | * {{mIRC|$round}} | ||
* {{mIRC|$calc}} | * {{mIRC|$calc}} | ||
* {{mIRC|$floor}} | * {{mIRC|$floor}} | ||
+ | * {{mIRC|$ceil}} | ||
+ | {{mIRC identifier list}} | ||
+ | |||
+ | [[Category:mIRC identifiers|int]] |
Latest revision as of 19:40, 13 August 2018
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
$int Returns the integer part of a floating point number with no rounding.
Synopsis[edit]
$int(N)
Parameters[edit]
- N = The number you want the integer part of
You can use the letter 'e' or 'd' as *10^N, $int(5e6) = $int($calc(5*10^6))
Properties[edit]
None
Example[edit]
//echo -a $int(1.9)
will return 1, the integer part
Compatibility[edit]
Added: mIRC v5.1
Added on: 28 Aug 1997
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.
See also[edit]
mIRC identifier list