S2:Int

From No LJ Ads Wiki

Jump to: navigation, search

An integer number. This isn't really a class, as suggested by its lower-case name. Parameters of type int pass by value, unlike all variables of real object types, which pass by reference. Instead, this is just a pseudo-class which provides convenience methods on instances of integers. The other pseudo-class is string.

[edit] Methods

compare(int n) : int Compare one integer with another. Returns a negative number if n is less than the subject, positive if greater or zero if the two are numerically equal.
string(int digits) : string Return the integer as a string formatted at least digits characters long, left-padded with zeroes.