From WikiChip
Difference between revisions of "mirc/identifiers/$int"
< mirc‎ | identifiers

(Parameters)
(Example)
Line 14: Line 14:
  
 
== Example ==
 
== Example ==
<source lang="mIRC">//echo -a $int(1.99999999999999)</source>
+
<source lang="mIRC">//echo -a $int(1.9)</source>
  
It will return '''1''' because it's integer the given number value.
+
will return '''1''', the integer part
 
 
<source lang="mIRC">//echo -a $int(1.9999999999999999)</source>
 
 
 
It will return '''2''' because it's integer the given number value.
 
  
 
== Compatibility ==
 
== Compatibility ==

Revision as of 22:32, 12 August 2018

$int(number) Returns the integer part of a floating point number with no rounding.

Synopsis

$int(N)

Parameters

  • N = The number you want the integer part of

Properties

None

Example

//echo -a $int(1.9)

will return 1, the integer part

Compatibility

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

[Expand]
v · d · e mIRC identifier list