Integer #
An integer can be positiv or negative and is always internally represented by a 64-Bit Integer.
To cast a negative integer a digit can be prefixed with a - eg. -456.
a = 1;
b = a + 2;
is_true = 1 == 1;
is_false = 1 == 2;
Literal Specific Methods #
plz_f() #
Returns
FLOAT
Converts the integer into a float.
π > a = 456
=> 456
π > a.plz_f()
=> 456.0
π > 1234.plz_f()
=> 1234.0
plz_i() #
Returns
INTEGER
Returns self
plz_s(INTEGER) #
Returns
STRING
Returns a string representation of the integer. Also takes an argument which represents the integer base to convert between different number systems
π > a = 456
=> 456
π > a.plz_s()
=> "456"
π > 1234.plz_s(2)
=> "10011010010"
π > 1234.plz_s(8)
=> "2322"
π > 1234.plz_s(10)
=> "1234"
Generic Literal Methods #
methods() #
Returns
ARRAY
Returns an array of all supported methods names.
π > "test".methods()
=> [count, downcase, find, reverse!, split, lines, upcase!, strip!, downcase!, size, plz_i, replace, reverse, strip, upcase]
type() #
Returns
STRING
Returns the type of the object.
π > "test".type()
=> "STRING"
wat() #
Returns
STRING
Returns the supported methods with usage information.
π > true.wat()
=> BOOLEAN supports the following methods:
plz_s()