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


5412
5413
# File 'Monkeybrains.rb', line 5412

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


5476
5477
# File 'Monkeybrains.rb', line 5476

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


5462
5463
# File 'Monkeybrains.rb', line 5462

def format(format)
end

toDoubleToybox::Lang::Double

Convert a Long to a Double.

Returns:

Since:

  • 1.0.0


5436
5437
# File 'Monkeybrains.rb', line 5436

def toDouble()
end

toFloatToybox::Lang::Float

Convert a Long to a Float.

Returns:

Since:

  • 1.0.0


5430
5431
# File 'Monkeybrains.rb', line 5430

def toFloat()
end

toLongToybox::Lang::Long

Convert a Long to a Long.

Returns:

Since:

  • 1.0.0


5418
5419
# File 'Monkeybrains.rb', line 5418

def toLong()
end

toNumberToybox::Lang::Number

Convert a Long to a Number.

Returns:

Since:

  • 1.0.0


5424
5425
# File 'Monkeybrains.rb', line 5424

def toNumber()
end

toStringToybox::Lang::String

Convert a Long to a String.

Returns:

Since:

  • 1.0.0


5468
5469
# File 'Monkeybrains.rb', line 5468

def toString()
end