Class: Toybox::Lang::Long

Inherits:
Object
  • Object
show all

Overview

Long represents a 64-bit signed integer.

To use a Long value in Monkey C add 'l' to the end of the number.

Examples:

var myLong = 9000l;

Since:

  • 1.0.0

Instance Method Summary collapse

Methods inherited from Object

hashCode, method, weak

Instance Method Details

absToybox::Lang::Long

Get the absolute value of a Long.

Returns:

Since:

  • 1.0.0


6372
6373
# File 'Monkeybrains.rb', line 6372

def abs()
end

equals(object) ⇒ Toybox::Lang::Boolean

Test if an Object instance is equal to another instance of an Object.

Parameters:

Returns:

Since:

  • 1.3.0


6436
6437
# File 'Monkeybrains.rb', line 6436

def equals(object)
end

format(format) ⇒ Toybox::Lang::String

Format a Long using a formatting String.

The formatting string is similar to that available in printf from the C stdio library, though the length option is not available:

"%[flags][width][.precision]specifier"
specifiers
  • d or i - signed decimal integer

  • e - scientific notation (mantissa/exponent) using 'e' character

  • E - scientific notation (mantissa/exponent) using 'E' character

  • f - decimal floating point

  • o - signed octal

  • u - unsigned decimal integer

  • x - unsigned hexadecimal integer

  • X - unsigned hexadecimal integer (capital letters)

flags
  • + - Prepends the result with a plus or minus sign ('+' or '-'), including positive numbers. By default, only negative numbers are preceded with a '-' sign.

  • 0 - Left-pads the number with zeros (0) instead of spaces, where padding is specified (see width sub-specifier).

width

supports only numbers (* is not supported)

.precision

supports only numbers (* is not supported)

Returns:

Since:

  • 1.0.0


6422
6423
# File 'Monkeybrains.rb', line 6422

def format(format)
end

toDoubleToybox::Lang::Double

Convert a Long to a Double.

Returns:

Since:

  • 1.0.0


6396
6397
# File 'Monkeybrains.rb', line 6396

def toDouble()
end

toFloatToybox::Lang::Float

Convert a Long to a Float.

Returns:

Since:

  • 1.0.0


6390
6391
# File 'Monkeybrains.rb', line 6390

def toFloat()
end

toLongToybox::Lang::Long

Convert a Long to a Long.

Returns:

Since:

  • 1.0.0


6378
6379
# File 'Monkeybrains.rb', line 6378

def toLong()
end

toNumberToybox::Lang::Number

Convert a Long to a Number.

Returns:

Since:

  • 1.0.0


6384
6385
# File 'Monkeybrains.rb', line 6384

def toNumber()
end

toStringToybox::Lang::String

Convert a Long to a String.

Returns:

Since:

  • 1.0.0


6428
6429
# File 'Monkeybrains.rb', line 6428

def toString()
end